diff --git a/.dropbox b/.dropbox new file mode 100644 index 00000000..4459de9b --- /dev/null +++ b/.dropbox @@ -0,0 +1 @@ +{"tag": "shared", "ns": 1421135978} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b8743f36..029f3516 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,40 @@ -bin -obj -*.suo -*.csproj.user -*.licx -*.lnk -iamjack.sh -iamjoe.sh \ No newline at end of file + +bin + + +obj + + +*.suo + +*.csproj + +*.user + + +*.licx + + +*.lnk + + +*.csv + + +iamjack.sh + + +iamjoe.sh + + +MotMaster2/Data/* + +*.sm2 + +MotMaster2/Scripts/*.sm2 + +packages/* + +*.tmp_proj + +.vscode/* diff --git a/BuffergasHardwareControl/BuffergasHardwareControl.csproj b/BuffergasHardwareControl/BuffergasHardwareControl.csproj index 9f53ad8e..13ffe640 100644 --- a/BuffergasHardwareControl/BuffergasHardwareControl.csproj +++ b/BuffergasHardwareControl/BuffergasHardwareControl.csproj @@ -1,174 +1,185 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF} - WinExe - Properties - BuffergasHardwareControl - BuffergasHardwareControl - v4.5 - 512 - - - - - 3.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - - - bin\EDMTestCrate\ - - - - - - False - C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.dll - - - False - C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.WindowsForms.dll - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - - - - - - - Form - - - ControlWindow.cs - - - - - ControlWindow.cs - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - DAQ - - - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930} - IMAQ - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF} + WinExe + Properties + BuffergasHardwareControl + BuffergasHardwareControl + v4.5 + 512 + + + + + 3.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\Wavemeter\ + + + bin\EDMTestCrate\ + + + + + + + + + + False + ..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies (64-bit)\Current\NationalInstruments.DAQmx.dll + + + + False + C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.dll + + + False + C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.WindowsForms.dll + + + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + + + + + Form + + + ControlWindow.cs + + + + + ControlWindow.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + DAQ + + + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930} + IMAQ + + + + \ No newline at end of file diff --git a/BuffergasHardwareControl/ControlWindow.Designer.cs b/BuffergasHardwareControl/ControlWindow.Designer.cs index eb83ffc4..ef709999 100644 --- a/BuffergasHardwareControl/ControlWindow.Designer.cs +++ b/BuffergasHardwareControl/ControlWindow.Designer.cs @@ -1,328 +1,328 @@ -namespace BuffergasHardwareControl -{ - partial class ControlWindow - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlWindow)); - this.label1 = new System.Windows.Forms.Label(); - this.FlowVoltageBox = new System.Windows.Forms.NumericUpDown(); - this.label2 = new System.Windows.Forms.Label(); - this.flowmeterTextBox1 = new System.Windows.Forms.TextBox(); - this.flowmeterbutton1 = new System.Windows.Forms.Button(); - this.snapshotButton = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.streamButton = new System.Windows.Forms.Button(); - this.stopStreamButton = new System.Windows.Forms.Button(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); - this.openImageViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveImagedataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.consoleRichTextBox = new System.Windows.Forms.RichTextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.led1 = new NationalInstruments.UI.WindowsForms.Led(); - this.commandTextBox = new System.Windows.Forms.TextBox(); - this.disposeButton = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.FlowVoltageBox)).BeginInit(); - this.toolStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.led1)).BeginInit(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(88, 121); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(76, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Flow Controller"; - // - // FlowVoltageBox - // - this.FlowVoltageBox.Location = new System.Drawing.Point(69, 147); - this.FlowVoltageBox.Name = "FlowVoltageBox"; - this.FlowVoltageBox.Size = new System.Drawing.Size(120, 20); - this.FlowVoltageBox.TabIndex = 2; - this.FlowVoltageBox.Value = new decimal(new int[] { - 2, - 0, - 0, - 0}); - this.FlowVoltageBox.ValueChanged += new System.EventHandler(this.FlowVoltageBox_ValueChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(88, 170); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(59, 13); - this.label2.TabIndex = 4; - this.label2.Text = "Flow Meter"; - // - // flowmeterTextBox1 - // - this.flowmeterTextBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.flowmeterTextBox1.Location = new System.Drawing.Point(69, 186); - this.flowmeterTextBox1.Name = "flowmeterTextBox1"; - this.flowmeterTextBox1.ReadOnly = true; - this.flowmeterTextBox1.Size = new System.Drawing.Size(100, 20); - this.flowmeterTextBox1.TabIndex = 6; - // - // flowmeterbutton1 - // - this.flowmeterbutton1.Location = new System.Drawing.Point(171, 185); - this.flowmeterbutton1.Name = "flowmeterbutton1"; - this.flowmeterbutton1.Size = new System.Drawing.Size(18, 21); - this.flowmeterbutton1.TabIndex = 7; - this.flowmeterbutton1.Text = "F"; - this.flowmeterbutton1.UseVisualStyleBackColor = true; - this.flowmeterbutton1.Click += new System.EventHandler(this.FlowmeterButton_Click); - // - // snapshotButton - // - this.snapshotButton.Location = new System.Drawing.Point(297, 120); - this.snapshotButton.Name = "snapshotButton"; - this.snapshotButton.Size = new System.Drawing.Size(49, 31); - this.snapshotButton.TabIndex = 8; - this.snapshotButton.Text = "Snap"; - this.snapshotButton.UseVisualStyleBackColor = true; - this.snapshotButton.Click += new System.EventHandler(this.snapshotButton_Click); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.BackColor = System.Drawing.SystemColors.Control; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(96, 68); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(51, 24); - this.label3.TabIndex = 9; - this.label3.Text = "Flow"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.BackColor = System.Drawing.SystemColors.Control; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(374, 68); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(76, 24); - this.label4.TabIndex = 10; - this.label4.Text = "Camera"; - // - // streamButton - // - this.streamButton.Location = new System.Drawing.Point(378, 120); - this.streamButton.Name = "streamButton"; - this.streamButton.Size = new System.Drawing.Size(58, 31); - this.streamButton.TabIndex = 14; - this.streamButton.Text = "Stream"; - this.streamButton.UseVisualStyleBackColor = true; - this.streamButton.Click += new System.EventHandler(this.streamButton_Click); - // - // stopStreamButton - // - this.stopStreamButton.Location = new System.Drawing.Point(465, 121); - this.stopStreamButton.Name = "stopStreamButton"; - this.stopStreamButton.Size = new System.Drawing.Size(43, 30); - this.stopStreamButton.TabIndex = 15; - this.stopStreamButton.Text = "Stop"; - this.stopStreamButton.UseVisualStyleBackColor = true; - this.stopStreamButton.Click += new System.EventHandler(this.stopStreamButton_Click); - // - // toolStrip1 - // - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripDropDownButton1}); - this.toolStrip1.Location = new System.Drawing.Point(0, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(575, 25); - this.toolStrip1.TabIndex = 16; - this.toolStrip1.Text = "toolStrip1"; - // - // toolStripDropDownButton1 - // - this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.openImageViewerToolStripMenuItem, - this.saveImageToolStripMenuItem, - this.saveImagesToolStripMenuItem, - this.saveImagedataToolStripMenuItem, - this.exitToolStripMenuItem}); - this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); - this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22); - this.toolStripDropDownButton1.Text = "toolStripDropDownButton1"; - // - // openImageViewerToolStripMenuItem - // - this.openImageViewerToolStripMenuItem.Name = "openImageViewerToolStripMenuItem"; - this.openImageViewerToolStripMenuItem.Size = new System.Drawing.Size(266, 22); - this.openImageViewerToolStripMenuItem.Text = "Start camera and open image viewer"; - this.openImageViewerToolStripMenuItem.Click += new System.EventHandler(this.openImageViewerToolStripMenuItem_Click); - // - // saveImageToolStripMenuItem - // - this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem"; - this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(266, 22); - this.saveImageToolStripMenuItem.Text = "Save image"; - this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click); - // - // saveImagesToolStripMenuItem - // - this.saveImagesToolStripMenuItem.Name = "saveImagesToolStripMenuItem"; - this.saveImagesToolStripMenuItem.Size = new System.Drawing.Size(266, 22); - this.saveImagesToolStripMenuItem.Text = "Save images"; - this.saveImagesToolStripMenuItem.Click += new System.EventHandler(this.saveImagesToolStripMenu_Click); - // - // saveImagedataToolStripMenuItem - // - this.saveImagedataToolStripMenuItem.Name = "saveImagedataToolStripMenuItem"; - this.saveImagedataToolStripMenuItem.Size = new System.Drawing.Size(266, 22); - this.saveImagedataToolStripMenuItem.Text = "Save imagedata"; - this.saveImagedataToolStripMenuItem.Click += new System.EventHandler(this.saveImageDataToolStripMenuItem_Click); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(266, 22); - this.exitToolStripMenuItem.Text = "Exit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // consoleRichTextBox - // - this.consoleRichTextBox.BackColor = System.Drawing.Color.Black; - this.consoleRichTextBox.ForeColor = System.Drawing.Color.Lime; - this.consoleRichTextBox.Location = new System.Drawing.Point(0, 282); - this.consoleRichTextBox.Name = "consoleRichTextBox"; - this.consoleRichTextBox.Size = new System.Drawing.Size(575, 79); - this.consoleRichTextBox.TabIndex = 17; - this.consoleRichTextBox.Text = ""; - this.consoleRichTextBox.TextChanged += new System.EventHandler(this.consoleRichTextBox_TextChanged); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(471, 12); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(40, 13); - this.label5.TabIndex = 18; - this.label5.Text = "Trigger"; - // - // led1 - // - this.led1.LedStyle = NationalInstruments.UI.LedStyle.Round3D; - this.led1.Location = new System.Drawing.Point(479, 28); - this.led1.Name = "led1"; - this.led1.Size = new System.Drawing.Size(29, 29); - this.led1.TabIndex = 19; - // - // commandTextBox - // - this.commandTextBox.BackColor = System.Drawing.Color.Black; - this.commandTextBox.ForeColor = System.Drawing.Color.Lime; - this.commandTextBox.Location = new System.Drawing.Point(0, 372); - this.commandTextBox.Name = "commandTextBox"; - this.commandTextBox.Size = new System.Drawing.Size(575, 20); - this.commandTextBox.TabIndex = 23; - this.commandTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.commandTextBox_KeyDown); - // - // disposeButton - // - this.disposeButton.Location = new System.Drawing.Point(297, 186); - this.disposeButton.Name = "disposeButton"; - this.disposeButton.Size = new System.Drawing.Size(69, 30); - this.disposeButton.TabIndex = 24; - this.disposeButton.Text = "Dispose"; - this.disposeButton.UseVisualStyleBackColor = true; - this.disposeButton.Click += new System.EventHandler(this.disposeButton_Click); - // - // ControlWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(575, 394); - this.Controls.Add(this.disposeButton); - this.Controls.Add(this.commandTextBox); - this.Controls.Add(this.led1); - this.Controls.Add(this.label5); - this.Controls.Add(this.consoleRichTextBox); - this.Controls.Add(this.toolStrip1); - this.Controls.Add(this.stopStreamButton); - this.Controls.Add(this.streamButton); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.snapshotButton); - this.Controls.Add(this.flowmeterbutton1); - this.Controls.Add(this.flowmeterTextBox1); - this.Controls.Add(this.label2); - this.Controls.Add(this.FlowVoltageBox); - this.Controls.Add(this.label1); - this.Name = "ControlWindow"; - this.Text = "ControlWindow"; - this.Load += new System.EventHandler(this.ControlWindow_Load); - ((System.ComponentModel.ISupportInitialize)(this.FlowVoltageBox)).EndInit(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.led1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.NumericUpDown FlowVoltageBox; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox flowmeterTextBox1; - private System.Windows.Forms.Button flowmeterbutton1; - private System.Windows.Forms.Button snapshotButton; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button streamButton; - private System.Windows.Forms.Button stopStreamButton; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; - private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem openImageViewerToolStripMenuItem; - private System.Windows.Forms.RichTextBox consoleRichTextBox; - private System.Windows.Forms.ToolStripMenuItem saveImagedataToolStripMenuItem; - private System.Windows.Forms.Label label5; - private NationalInstruments.UI.WindowsForms.Led led1; - private System.Windows.Forms.TextBox commandTextBox; - private System.Windows.Forms.ToolStripMenuItem saveImagesToolStripMenuItem; - private System.Windows.Forms.Button disposeButton; - } -} - +namespace BuffergasHardwareControl +{ + partial class ControlWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlWindow)); + this.label1 = new System.Windows.Forms.Label(); + this.FlowVoltageBox = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.flowmeterTextBox1 = new System.Windows.Forms.TextBox(); + this.flowmeterbutton1 = new System.Windows.Forms.Button(); + this.snapshotButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.streamButton = new System.Windows.Forms.Button(); + this.stopStreamButton = new System.Windows.Forms.Button(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); + this.openImageViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveImagedataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.consoleRichTextBox = new System.Windows.Forms.RichTextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.led1 = new NationalInstruments.UI.WindowsForms.Led(); + this.commandTextBox = new System.Windows.Forms.TextBox(); + this.disposeButton = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.FlowVoltageBox)).BeginInit(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.led1)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(88, 121); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(76, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Flow Controller"; + // + // FlowVoltageBox + // + this.FlowVoltageBox.Location = new System.Drawing.Point(69, 147); + this.FlowVoltageBox.Name = "FlowVoltageBox"; + this.FlowVoltageBox.Size = new System.Drawing.Size(120, 20); + this.FlowVoltageBox.TabIndex = 2; + this.FlowVoltageBox.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.FlowVoltageBox.ValueChanged += new System.EventHandler(this.FlowVoltageBox_ValueChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(88, 170); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(59, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Flow Meter"; + // + // flowmeterTextBox1 + // + this.flowmeterTextBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.flowmeterTextBox1.Location = new System.Drawing.Point(69, 186); + this.flowmeterTextBox1.Name = "flowmeterTextBox1"; + this.flowmeterTextBox1.ReadOnly = true; + this.flowmeterTextBox1.Size = new System.Drawing.Size(100, 20); + this.flowmeterTextBox1.TabIndex = 6; + // + // flowmeterbutton1 + // + this.flowmeterbutton1.Location = new System.Drawing.Point(171, 185); + this.flowmeterbutton1.Name = "flowmeterbutton1"; + this.flowmeterbutton1.Size = new System.Drawing.Size(18, 21); + this.flowmeterbutton1.TabIndex = 7; + this.flowmeterbutton1.Text = "F"; + this.flowmeterbutton1.UseVisualStyleBackColor = true; + this.flowmeterbutton1.Click += new System.EventHandler(this.FlowmeterButton_Click); + // + // snapshotButton + // + this.snapshotButton.Location = new System.Drawing.Point(297, 120); + this.snapshotButton.Name = "snapshotButton"; + this.snapshotButton.Size = new System.Drawing.Size(49, 31); + this.snapshotButton.TabIndex = 8; + this.snapshotButton.Text = "Snap"; + this.snapshotButton.UseVisualStyleBackColor = true; + this.snapshotButton.Click += new System.EventHandler(this.snapshotButton_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.SystemColors.Control; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(96, 68); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(51, 24); + this.label3.TabIndex = 9; + this.label3.Text = "Flow"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.BackColor = System.Drawing.SystemColors.Control; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(374, 68); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(76, 24); + this.label4.TabIndex = 10; + this.label4.Text = "Camera"; + // + // streamButton + // + this.streamButton.Location = new System.Drawing.Point(378, 120); + this.streamButton.Name = "streamButton"; + this.streamButton.Size = new System.Drawing.Size(58, 31); + this.streamButton.TabIndex = 14; + this.streamButton.Text = "Stream"; + this.streamButton.UseVisualStyleBackColor = true; + this.streamButton.Click += new System.EventHandler(this.streamButton_Click); + // + // stopStreamButton + // + this.stopStreamButton.Location = new System.Drawing.Point(465, 121); + this.stopStreamButton.Name = "stopStreamButton"; + this.stopStreamButton.Size = new System.Drawing.Size(43, 30); + this.stopStreamButton.TabIndex = 15; + this.stopStreamButton.Text = "Stop"; + this.stopStreamButton.UseVisualStyleBackColor = true; + this.stopStreamButton.Click += new System.EventHandler(this.stopStreamButton_Click); + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripDropDownButton1}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(575, 25); + this.toolStrip1.TabIndex = 16; + this.toolStrip1.Text = "toolStrip1"; + // + // toolStripDropDownButton1 + // + this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.openImageViewerToolStripMenuItem, + this.saveImageToolStripMenuItem, + this.saveImagesToolStripMenuItem, + this.saveImagedataToolStripMenuItem, + this.exitToolStripMenuItem}); + this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); + this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; + this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22); + this.toolStripDropDownButton1.Text = "toolStripDropDownButton1"; + // + // openImageViewerToolStripMenuItem + // + this.openImageViewerToolStripMenuItem.Name = "openImageViewerToolStripMenuItem"; + this.openImageViewerToolStripMenuItem.Size = new System.Drawing.Size(266, 22); + this.openImageViewerToolStripMenuItem.Text = "Start camera and open image viewer"; + this.openImageViewerToolStripMenuItem.Click += new System.EventHandler(this.openImageViewerToolStripMenuItem_Click); + // + // saveImageToolStripMenuItem + // + this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem"; + this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(266, 22); + this.saveImageToolStripMenuItem.Text = "Save image"; + this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click); + // + // saveImagesToolStripMenuItem + // + this.saveImagesToolStripMenuItem.Name = "saveImagesToolStripMenuItem"; + this.saveImagesToolStripMenuItem.Size = new System.Drawing.Size(266, 22); + this.saveImagesToolStripMenuItem.Text = "Save images"; + this.saveImagesToolStripMenuItem.Click += new System.EventHandler(this.saveImagesToolStripMenu_Click); + // + // saveImagedataToolStripMenuItem + // + this.saveImagedataToolStripMenuItem.Name = "saveImagedataToolStripMenuItem"; + this.saveImagedataToolStripMenuItem.Size = new System.Drawing.Size(266, 22); + this.saveImagedataToolStripMenuItem.Text = "Save imagedata"; + this.saveImagedataToolStripMenuItem.Click += new System.EventHandler(this.saveImageDataToolStripMenuItem_Click); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(266, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // consoleRichTextBox + // + this.consoleRichTextBox.BackColor = System.Drawing.Color.Black; + this.consoleRichTextBox.ForeColor = System.Drawing.Color.Lime; + this.consoleRichTextBox.Location = new System.Drawing.Point(0, 282); + this.consoleRichTextBox.Name = "consoleRichTextBox"; + this.consoleRichTextBox.Size = new System.Drawing.Size(575, 79); + this.consoleRichTextBox.TabIndex = 17; + this.consoleRichTextBox.Text = ""; + this.consoleRichTextBox.TextChanged += new System.EventHandler(this.consoleRichTextBox_TextChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(471, 12); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(40, 13); + this.label5.TabIndex = 18; + this.label5.Text = "Trigger"; + // + // led1 + // + this.led1.LedStyle = NationalInstruments.UI.LedStyle.Round3D; + this.led1.Location = new System.Drawing.Point(479, 28); + this.led1.Name = "led1"; + this.led1.Size = new System.Drawing.Size(29, 29); + this.led1.TabIndex = 19; + // + // commandTextBox + // + this.commandTextBox.BackColor = System.Drawing.Color.Black; + this.commandTextBox.ForeColor = System.Drawing.Color.Lime; + this.commandTextBox.Location = new System.Drawing.Point(0, 372); + this.commandTextBox.Name = "commandTextBox"; + this.commandTextBox.Size = new System.Drawing.Size(575, 20); + this.commandTextBox.TabIndex = 23; + this.commandTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.commandTextBox_KeyDown); + // + // disposeButton + // + this.disposeButton.Location = new System.Drawing.Point(297, 186); + this.disposeButton.Name = "disposeButton"; + this.disposeButton.Size = new System.Drawing.Size(69, 30); + this.disposeButton.TabIndex = 24; + this.disposeButton.Text = "Dispose"; + this.disposeButton.UseVisualStyleBackColor = true; + this.disposeButton.Click += new System.EventHandler(this.disposeButton_Click); + // + // ControlWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(575, 394); + this.Controls.Add(this.disposeButton); + this.Controls.Add(this.commandTextBox); + this.Controls.Add(this.led1); + this.Controls.Add(this.label5); + this.Controls.Add(this.consoleRichTextBox); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.stopStreamButton); + this.Controls.Add(this.streamButton); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.snapshotButton); + this.Controls.Add(this.flowmeterbutton1); + this.Controls.Add(this.flowmeterTextBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.FlowVoltageBox); + this.Controls.Add(this.label1); + this.Name = "ControlWindow"; + this.Text = "ControlWindow"; + this.Load += new System.EventHandler(this.ControlWindow_Load); + ((System.ComponentModel.ISupportInitialize)(this.FlowVoltageBox)).EndInit(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.led1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown FlowVoltageBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox flowmeterTextBox1; + private System.Windows.Forms.Button flowmeterbutton1; + private System.Windows.Forms.Button snapshotButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button streamButton; + private System.Windows.Forms.Button stopStreamButton; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; + private System.Windows.Forms.ToolStripMenuItem saveImageToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openImageViewerToolStripMenuItem; + private System.Windows.Forms.RichTextBox consoleRichTextBox; + private System.Windows.Forms.ToolStripMenuItem saveImagedataToolStripMenuItem; + private System.Windows.Forms.Label label5; + private NationalInstruments.UI.WindowsForms.Led led1; + private System.Windows.Forms.TextBox commandTextBox; + private System.Windows.Forms.ToolStripMenuItem saveImagesToolStripMenuItem; + private System.Windows.Forms.Button disposeButton; + } +} + diff --git a/BuffergasHardwareControl/ControlWindow.cs b/BuffergasHardwareControl/ControlWindow.cs index fa13b1c3..cb8ff805 100644 --- a/BuffergasHardwareControl/ControlWindow.cs +++ b/BuffergasHardwareControl/ControlWindow.cs @@ -1,299 +1,299 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -namespace BuffergasHardwareControl -{ - public partial class ControlWindow : Form - { - - private double flow_voltage; - private ControlWindow window; - public Controller controller; - private Dictionary AOTextBoxes = new Dictionary(); - private Dictionary DOCheckBoxes = new Dictionary(); - public int nos; - private string textstring; - - public ControlWindow() - { - InitializeComponent(); - } - - #region ThreadSafe wrappers - - private void setCheckBox(CheckBox box, bool state) - { - box.Invoke(new setCheckDelegate(setCheckHelper), new object[] { box, state }); - } - private delegate void setCheckDelegate(CheckBox box, bool state); - private void setCheckHelper(CheckBox box, bool state) - { - box.Checked = state; - } - - private void setTabEnable(TabControl box, bool state) - { - box.Invoke(new setTabEnableDelegate(setTabEnableHelper), new object[] { box, state }); - } - private delegate void setTabEnableDelegate(TabControl box, bool state); - private void setTabEnableHelper(TabControl box, bool state) - { - box.Enabled = state; - } - - private void setTextBox(TextBox box, string text) - { - box.Invoke(new setTextDelegate(setTextHelper), new object[] { box, text }); - } - private delegate void setTextDelegate(TextBox box, string text); - private void setTextHelper(TextBox box, string text) - { - box.Text = text; - } - - private void setRichTextBox(RichTextBox box, string text) - { - box.Invoke(new setRichTextDelegate(setRichTextHelper), new object[] { box, text }); - } - private delegate void setRichTextDelegate(RichTextBox box, string text); - - private void setRichTextHelper(RichTextBox box, string text) - { - box.AppendText(text); - consoleRichTextBox.ScrollToCaret(); - } - - //private void setLED(NationalInstruments.UI.WindowsForms.Led led, bool val) - //{ - // led.Invoke(new SetLedDelegate(SetLedHelper), new object[] { led, val }); - //} - //private delegate void SetLedDelegate(NationalInstruments.UI.WindowsForms.Led led, bool val); - //private void SetLedHelper(NationalInstruments.UI.WindowsForms.Led led, bool val) - //{ - // led.Value = val; - //} - - #endregion - - #region Public properties for controlling UI. - //This gets/sets the values on the GUI panel - public void WriteToConsole(string text) - { - setRichTextBox(consoleRichTextBox, ">> " + text + "\n"); - - } - - - private void ReadIntFromCommandWindow() - { - - textstring=commandTextBox.Text; - setTextBox(commandTextBox, textstring); - WriteToConsole(textstring); - nos = Convert.ToInt32(textstring); - - - } - - - - - - - - - - - - - - //public double ReadAnalog(string channelName) - //{ - // return double.Parse(AOTextBoxes[channelName].Text); - //} - //public void SetAnalog(string channelName, double value) - //{ - // setTextBox(AOTextBoxes[channelName], Convert.ToString(value)); - //} - //public bool ReadDigital(string channelName) - //{ - // return DOCheckBoxes[channelName].Checked; - //} - //public void SetDigital(string channelName, bool value) - //{ - // setCheckBox(DOCheckBoxes[channelName], value); - //} - #endregion - - #region Flow Control - private void FlowVoltageBox_ValueChanged(object sender, EventArgs e) - { - //the conversion factor from voltage to flow, currently set to 1 - flow_voltage = ((double)FlowVoltageBox.Value) * 1; - controller.FlowControlVoltage = flow_voltage; - } - - - - private void FlowmeterButton_Click(object sender, EventArgs e) - { - flowmeterTextBox1.Text = controller.FlowInputVoltage.ToString(); - } - #endregion - - #region Camera Control - - - - - - - - - //event based methods - - - private void snapshotButton_Click(object sender, EventArgs e) - { - controller.CameraSnapshot(); - WriteToConsole("Taking a Snapshot"); - } - - private void streamButton_Click(object sender, EventArgs e) - { - controller.CameraStream(); - WriteToConsole("Camera Streaming"); - } - - private void stopStreamButton_Click(object sender, EventArgs e) - { - controller.StopCameraStream(); - WriteToConsole("Camera stopped"); - } - - private void saveImageToolStripMenuItem_Click(object sender, EventArgs e) - { - controller.SaveImageWithDialog(); - } - - private void exitToolStripMenuItem_Click(object sender, EventArgs e) - { - Close(); - } - - - private void openImageViewerToolStripMenuItem_Click(object sender, EventArgs e) - { - controller.StartCameraControl(); - } - - - private void saveImagesToolStripMenu_Click(object sender, EventArgs e) - { - WriteToConsole("Control not working yet, use save ImageData"); - //controller.StoreImageWithDialog(nos, imaged); - } - - - - - private void saveImageDataToolStripMenuItem_Click(object sender, EventArgs e) - { - controller.StoreImageDataWithDialog(); - WriteToConsole("ImageData saved"); - - - } - - #endregion - - - - - // private byte[][,] imaged; - - private void commandTextBox_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyData == Keys.Enter) - { - ReadIntFromCommandWindow(); - commandTextBox.Clear(); - // imaged = controller.GrabMultipleImages(nos); - //controller.GrabNextImage(); - // WriteToConsole("Images acquired"); - - } - - } - - private void disposeButton_Click(object sender, EventArgs e) - { - controller.DisposeImages(); - WriteToConsole("Images deleted"); - - } - - private void ControlWindow_Load(object sender, EventArgs e) - { - - } - - private void consoleRichTextBox_TextChanged(object sender, EventArgs e) - { - - } - - - - - - - - - - - - - - - //#region UI state - - //public void UpdateUIState(Controller.SHCUIControlState state) - //{ - // switch (state) - // { - // case Controller.SHCUIControlState.OFF: - - // setLED(remoteControlLED, false); - - - // break; - - // case Controller.SHCUIControlState.LOCAL: - - // setLED(remoteControlLED, false); - - // break; - - // case Controller.SHCUIControlState.REMOTE: - - // setLED(remoteControlLED, true); - - - // break; - // } - //} - - - //#endregion - - } - - -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace BuffergasHardwareControl +{ + public partial class ControlWindow : Form + { + + private double flow_voltage; + private ControlWindow window; + public Controller controller; + private Dictionary AOTextBoxes = new Dictionary(); + private Dictionary DOCheckBoxes = new Dictionary(); + public int nos; + private string textstring; + + public ControlWindow() + { + InitializeComponent(); + } + + #region ThreadSafe wrappers + + private void setCheckBox(CheckBox box, bool state) + { + box.Invoke(new setCheckDelegate(setCheckHelper), new object[] { box, state }); + } + private delegate void setCheckDelegate(CheckBox box, bool state); + private void setCheckHelper(CheckBox box, bool state) + { + box.Checked = state; + } + + private void setTabEnable(TabControl box, bool state) + { + box.Invoke(new setTabEnableDelegate(setTabEnableHelper), new object[] { box, state }); + } + private delegate void setTabEnableDelegate(TabControl box, bool state); + private void setTabEnableHelper(TabControl box, bool state) + { + box.Enabled = state; + } + + private void setTextBox(TextBox box, string text) + { + box.Invoke(new setTextDelegate(setTextHelper), new object[] { box, text }); + } + private delegate void setTextDelegate(TextBox box, string text); + private void setTextHelper(TextBox box, string text) + { + box.Text = text; + } + + private void setRichTextBox(RichTextBox box, string text) + { + box.Invoke(new setRichTextDelegate(setRichTextHelper), new object[] { box, text }); + } + private delegate void setRichTextDelegate(RichTextBox box, string text); + + private void setRichTextHelper(RichTextBox box, string text) + { + box.AppendText(text); + consoleRichTextBox.ScrollToCaret(); + } + + //private void setLED(NationalInstruments.UI.WindowsForms.Led led, bool val) + //{ + // led.Invoke(new SetLedDelegate(SetLedHelper), new object[] { led, val }); + //} + //private delegate void SetLedDelegate(NationalInstruments.UI.WindowsForms.Led led, bool val); + //private void SetLedHelper(NationalInstruments.UI.WindowsForms.Led led, bool val) + //{ + // led.Value = val; + //} + + #endregion + + #region Public properties for controlling UI. + //This gets/sets the values on the GUI panel + public void WriteToConsole(string text) + { + setRichTextBox(consoleRichTextBox, ">> " + text + "\n"); + + } + + + private void ReadIntFromCommandWindow() + { + + textstring=commandTextBox.Text; + setTextBox(commandTextBox, textstring); + WriteToConsole(textstring); + nos = Convert.ToInt32(textstring); + + + } + + + + + + + + + + + + + + //public double ReadAnalog(string channelName) + //{ + // return double.Parse(AOTextBoxes[channelName].Text); + //} + //public void SetAnalog(string channelName, double value) + //{ + // setTextBox(AOTextBoxes[channelName], Convert.ToString(value)); + //} + //public bool ReadDigital(string channelName) + //{ + // return DOCheckBoxes[channelName].Checked; + //} + //public void SetDigital(string channelName, bool value) + //{ + // setCheckBox(DOCheckBoxes[channelName], value); + //} + #endregion + + #region Flow Control + private void FlowVoltageBox_ValueChanged(object sender, EventArgs e) + { + //the conversion factor from voltage to flow, currently set to 1 + flow_voltage = ((double)FlowVoltageBox.Value) * 1; + controller.FlowControlVoltage = flow_voltage; + } + + + + private void FlowmeterButton_Click(object sender, EventArgs e) + { + flowmeterTextBox1.Text = controller.FlowInputVoltage.ToString(); + } + #endregion + + #region Camera Control + + + + + + + + + //event based methods + + + private void snapshotButton_Click(object sender, EventArgs e) + { + controller.CameraSnapshot(); + WriteToConsole("Taking a Snapshot"); + } + + private void streamButton_Click(object sender, EventArgs e) + { + controller.CameraStream(); + WriteToConsole("Camera Streaming"); + } + + private void stopStreamButton_Click(object sender, EventArgs e) + { + controller.StopCameraStream(); + WriteToConsole("Camera stopped"); + } + + private void saveImageToolStripMenuItem_Click(object sender, EventArgs e) + { + controller.SaveImageWithDialog(); + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + + private void openImageViewerToolStripMenuItem_Click(object sender, EventArgs e) + { + controller.StartCameraControl(); + } + + + private void saveImagesToolStripMenu_Click(object sender, EventArgs e) + { + WriteToConsole("Control not working yet, use save ImageData"); + //controller.StoreImageWithDialog(nos, imaged); + } + + + + + private void saveImageDataToolStripMenuItem_Click(object sender, EventArgs e) + { + controller.StoreImageDataWithDialog(); + WriteToConsole("ImageData saved"); + + + } + + #endregion + + + + + // private byte[][,] imaged; + + private void commandTextBox_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyData == Keys.Enter) + { + ReadIntFromCommandWindow(); + commandTextBox.Clear(); + // imaged = controller.GrabMultipleImages(nos); + //controller.GrabNextImage(); + // WriteToConsole("Images acquired"); + + } + + } + + private void disposeButton_Click(object sender, EventArgs e) + { + controller.DisposeImages(); + WriteToConsole("Images deleted"); + + } + + private void ControlWindow_Load(object sender, EventArgs e) + { + + } + + private void consoleRichTextBox_TextChanged(object sender, EventArgs e) + { + + } + + + + + + + + + + + + + + + //#region UI state + + //public void UpdateUIState(Controller.SHCUIControlState state) + //{ + // switch (state) + // { + // case Controller.SHCUIControlState.OFF: + + // setLED(remoteControlLED, false); + + + // break; + + // case Controller.SHCUIControlState.LOCAL: + + // setLED(remoteControlLED, false); + + // break; + + // case Controller.SHCUIControlState.REMOTE: + + // setLED(remoteControlLED, true); + + + // break; + // } + //} + + + //#endregion + + } + + +} diff --git a/BuffergasHardwareControl/ControlWindow.resx b/BuffergasHardwareControl/ControlWindow.resx index f906aeec..62c381dc 100644 --- a/BuffergasHardwareControl/ControlWindow.resx +++ b/BuffergasHardwareControl/ControlWindow.resx @@ -1,139 +1,139 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + \ No newline at end of file diff --git a/BuffergasHardwareControl/app.config b/BuffergasHardwareControl/app.config index 7ecb237f..5d485e7e 100644 --- a/BuffergasHardwareControl/app.config +++ b/BuffergasHardwareControl/app.config @@ -1,8 +1,8 @@ - + -
+
@@ -12,4 +12,13 @@ - + + + + + + + + + + diff --git a/DAQ/AnalogPatternBuilder.cs b/DAQ/AnalogPatternBuilder.cs index dbf1f845..0160703a 100644 --- a/DAQ/AnalogPatternBuilder.cs +++ b/DAQ/AnalogPatternBuilder.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text; using System.Collections; +using System.Linq; using DAQ.HAL; using DAQ.Environment; @@ -79,6 +80,7 @@ private List getSortedListOfEvents(string channel) return ints; } + public double GetValue(string channel, int time) { List events = getSortedListOfEvents(channel); @@ -92,6 +94,16 @@ public double GetValue(string channel, int time) } return val; } + public int GetLastEventTime() + { + List latestTimesPerChannel = new List(); + foreach (Dictionary entry in AnalogPatterns.Values) + { + if (entry.Keys.Count >0) + latestTimesPerChannel.Add(entry.Keys.Max()); + } + return latestTimesPerChannel.Max(); + } public void AddLinearRamp(string channel, int startTime, int steps, double finalValue) { if (PatternLength > startTime + steps) @@ -115,7 +127,34 @@ public void AddLinearRamp(string channel, int startTime, int steps, double final throw new InsufficientPatternLengthException(); } } + public void AddFunction(string channel, int startTime, int endTime, Func function) + { + if (PatternLength > endTime) + { + double startValue = GetValue(channel, startTime); + if (Math.Abs(startValue - function(startTime)) >= Math.Pow(2, -12)) + { + Console.WriteLine(startValue+" " +function(startTime)); + throw new ConflictInPatternException(); + } + for (int i = 0; i < endTime - startTime; i++) + { + if (AnalogPatterns[channel].ContainsKey(startTime + i) == false) + { + AddAnalogValue(channel, startTime + i, function(startTime + i)); + } + else + { + throw new ConflictInPatternException(); + } + } + } + else + { + throw new InsufficientPatternLengthException(); + } + } //For a single channel, gets a sequence of events (changes to the output value) and builds a pattern. private double[] buildSinglePattern(string channel) { @@ -129,11 +168,9 @@ private double[] buildSinglePattern(string channel) double dval = AnalogPatterns[channel][events[i]]; for (int j = 0; j < timeUntilNextEvent; j++) { - try - { + if (calibrations.ContainsKey(channel)) d[events[i] + j] = ((Calibration)calibrations[channel]).Convert(dval); - } - catch + else { d[events[i] + j] = dval; } diff --git a/DAQ/AnritsuVNA.cs b/DAQ/AnritsuVNA.cs index 21a3663d..82d91e4d 100644 --- a/DAQ/AnritsuVNA.cs +++ b/DAQ/AnritsuVNA.cs @@ -1,208 +1,208 @@ -using System; -using DAQ.Environment; - -namespace DAQ.HAL -{ - /// - /// This class represents a GPIB controlled Anrituso 37247C microwave VNA. - /// - public class AnritsuVNA : GPIBInstrument - { - - string averaging; /// Internal variable used for setting averaging settings - // private string bgSub; /// Internal variable used for setting background subtractino settings settings - string finalString; - - public AnritsuVNA(String visaAddress) - : base(visaAddress) /// Connect the VNA - { } - - public void SetVNATimeout() - { - Timeout(); - } - - public void SetVNATimeout(int numChars) - { - Timeout(numChars); - } - - public void Test() - { - Write("CNTR 13.9706E10 GHZ;SPAN 20 MHZ;TRS"); - Write("RTL"); - } - public void VNALocalControl() - { - Write("RTL"); /// Return the VNA to local control - } - public void SetCent(double centre) - { - Write("CNTR " + centre.ToString() + " GHZ"); /// Set the centre frequency of the VNA scan in GHz - } - public void SetSpan(double span) - { - Write("SPAN " + span.ToString() + " MHZ"); /// Set span of the vna scan in MHz. Note that centre +/- span must be in the range 40 MHz to 30 GHz - } - public string SWRTrace(int av, int avFactor, int numPoints) /// Take a trace of the Standing Wave Ratio - { - if (av == 1) - { - averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor - } - else - { - averaging = "AOF"; /// Turn off averaging - avFactor = 1; - } - if (!Environs.Debug) - { - Write(averaging + ";NP" + numPoints.ToString() + ";"); - Write("MOF;CH1;HLD;SWR;TRS;WFS;ASC;*OPC?"); // Prepare the channel for magnitude data - string opcMag = Read(); // Wait for operations complete - Write("FDH2;OFV"); // Prepare to read frequency data - string freq = Read(numPoints*19); // Read frequency data - DateTime startTime = DateTime.UtcNow; /// Set a start time for read timeout - while (true) - { - if (freq.Length == numPoints * 19) /// Break once all points have been read - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(10)) /// Or break once timeout is reached - { - break; - } - } - Write("FDH2;OFD"); // Prepare to read magnitude trace data - string data = Read(19 * numPoints); // Read magnitude trace data - startTime = DateTime.UtcNow; - while (true) - { - if (data.Length == numPoints * 19) - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(10)) - { - break; - } - } - finalString = freq + ";" + data; - Write("RTL"); - return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) - } - else - { - return null; - } - } - public string MagTrace(int av, int avFactor, int numPoints) - { - if (av == 1) - { - averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor - } - else - { - averaging = "AOF"; /// Turn off averaging - avFactor = 1; - } - if (!Environs.Debug) - { - Write(averaging + ";NP" + numPoints.ToString() + ";"); - Write("MOF;CH1;HLD;MAG;TRS;WFS;ASC;*OPC?"); // Prepare the channel for magnitude data - string opcMag = Read(); // Wait for operations complete - Write("FDH2;OFV"); // Prepare to read frequency data - string freq = Read(19*numPoints); // Read frequency data - DateTime startTime = DateTime.UtcNow; - while (true) - { - if (freq.Length == numPoints * 19) - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) - { - break; - } - } - Write("FDH2;OFD"); // Prepare to read magnitude trace data - string data = Read(19*numPoints); // Read magnitude trace data - startTime = DateTime.UtcNow; - while (true) - { - if (data.Length == numPoints * 19) - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) - { - break; - } - } - finalString = freq + ";" + data; - Write("RTL"); - return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) - } - else - { - return null; - } - } - public string PhaseTrace(int av, int avFactor, int numPoints) - { - if (av == 1) - { - averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor - } - else - { - averaging = "AOF"; /// Turn off averaging - avFactor = 1; - } - if (!Environs.Debug) - { - Write(averaging + ";NP" + numPoints.ToString() + ";"); - Write("MOF;CH2;HLD;PHA;TRS;WFS;*OPC?"); /// Prepare the channel for phase data - string opcPha = Read(); - Write("FDH2;OFV"); // Prepare to read frequency data - string freq = Read(19*numPoints); // Read frequency data - DateTime startTime = DateTime.UtcNow; - while (true) - { - if (freq.Length == numPoints * 19) - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) - { - break; - } - - } - Write("FDH2;OFD"); // Prepare to read phase data - string data = Read(19*numPoints); // Read phase data - startTime = DateTime.UtcNow; - while (true) - { - if (data.Length == numPoints * 19) - { - break; - } - if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) - { - break; - } - } - finalString = freq + ";" + data; - Write("RTL"); - return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) - } - else - { - return null; - } - } - } +using System; +using DAQ.Environment; + +namespace DAQ.HAL +{ + /// + /// This class represents a GPIB controlled Anrituso 37247C microwave VNA. + /// + public class AnritsuVNA : GPIBInstrument + { + + string averaging; /// Internal variable used for setting averaging settings + // private string bgSub; /// Internal variable used for setting background subtractino settings settings + string finalString; + + public AnritsuVNA(String visaAddress) + : base(visaAddress) /// Connect the VNA + { } + + public void SetVNATimeout() + { + Timeout(); + } + + public void SetVNATimeout(int numChars) + { + Timeout(numChars); + } + + public void Test() + { + Write("CNTR 13.9706E10 GHZ;SPAN 20 MHZ;TRS"); + Write("RTL"); + } + public void VNALocalControl() + { + Write("RTL"); /// Return the VNA to local control + } + public void SetCent(double centre) + { + Write("CNTR " + centre.ToString() + " GHZ"); /// Set the centre frequency of the VNA scan in GHz + } + public void SetSpan(double span) + { + Write("SPAN " + span.ToString() + " MHZ"); /// Set span of the vna scan in MHz. Note that centre +/- span must be in the range 40 MHz to 30 GHz + } + public string SWRTrace(int av, int avFactor, int numPoints) /// Take a trace of the Standing Wave Ratio + { + if (av == 1) + { + averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor + } + else + { + averaging = "AOF"; /// Turn off averaging + avFactor = 1; + } + if (!Environs.Debug) + { + Write(averaging + ";NP" + numPoints.ToString() + ";"); + Write("MOF;CH1;HLD;SWR;TRS;WFS;ASC;*OPC?"); // Prepare the channel for magnitude data + string opcMag = Read(); // Wait for operations complete + Write("FDH2;OFV"); // Prepare to read frequency data + string freq = Read(numPoints*19); // Read frequency data + DateTime startTime = DateTime.UtcNow; /// Set a start time for read timeout + while (true) + { + if (freq.Length == numPoints * 19) /// Break once all points have been read + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(10)) /// Or break once timeout is reached + { + break; + } + } + Write("FDH2;OFD"); // Prepare to read magnitude trace data + string data = Read(19 * numPoints); // Read magnitude trace data + startTime = DateTime.UtcNow; + while (true) + { + if (data.Length == numPoints * 19) + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(10)) + { + break; + } + } + finalString = freq + ";" + data; + Write("RTL"); + return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) + } + else + { + return null; + } + } + public string MagTrace(int av, int avFactor, int numPoints) + { + if (av == 1) + { + averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor + } + else + { + averaging = "AOF"; /// Turn off averaging + avFactor = 1; + } + if (!Environs.Debug) + { + Write(averaging + ";NP" + numPoints.ToString() + ";"); + Write("MOF;CH1;HLD;MAG;TRS;WFS;ASC;*OPC?"); // Prepare the channel for magnitude data + string opcMag = Read(); // Wait for operations complete + Write("FDH2;OFV"); // Prepare to read frequency data + string freq = Read(19*numPoints); // Read frequency data + DateTime startTime = DateTime.UtcNow; + while (true) + { + if (freq.Length == numPoints * 19) + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) + { + break; + } + } + Write("FDH2;OFD"); // Prepare to read magnitude trace data + string data = Read(19*numPoints); // Read magnitude trace data + startTime = DateTime.UtcNow; + while (true) + { + if (data.Length == numPoints * 19) + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) + { + break; + } + } + finalString = freq + ";" + data; + Write("RTL"); + return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) + } + else + { + return null; + } + } + public string PhaseTrace(int av, int avFactor, int numPoints) + { + if (av == 1) + { + averaging = "AON;AVG " + avFactor.ToString(); /// Turn on averaging and set the averaging factor + } + else + { + averaging = "AOF"; /// Turn off averaging + avFactor = 1; + } + if (!Environs.Debug) + { + Write(averaging + ";NP" + numPoints.ToString() + ";"); + Write("MOF;CH2;HLD;PHA;TRS;WFS;*OPC?"); /// Prepare the channel for phase data + string opcPha = Read(); + Write("FDH2;OFV"); // Prepare to read frequency data + string freq = Read(19*numPoints); // Read frequency data + DateTime startTime = DateTime.UtcNow; + while (true) + { + if (freq.Length == numPoints * 19) + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) + { + break; + } + + } + Write("FDH2;OFD"); // Prepare to read phase data + string data = Read(19*numPoints); // Read phase data + startTime = DateTime.UtcNow; + while (true) + { + if (data.Length == numPoints * 19) + { + break; + } + if (DateTime.UtcNow - startTime > TimeSpan.FromSeconds(30)) + { + break; + } + } + finalString = freq + ";" + data; + Write("RTL"); + return finalString; /// Output the list of frequencies and both magnitude and phase data (records both because of the "DPRS1" command) + } + else + { + return null; + } + } + } } \ No newline at end of file diff --git a/DAQ/ClassDiagram1.cd b/DAQ/ClassDiagram1.cd new file mode 100644 index 00000000..77a8b745 --- /dev/null +++ b/DAQ/ClassDiagram1.cd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/DAQ/DAQ.csproj b/DAQ/DAQ.csproj index 603b2a56..b1337593 100644 --- a/DAQ/DAQ.csproj +++ b/DAQ/DAQ.csproj @@ -1,375 +1,505 @@ - - - - Local - 9.0.21022 - 2.0 - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - Debug - AnyCPU - - - - - DAQ - - - JScript - Grid - IE50 - false - Library - DAQ - OnBuildSuccess - - - - - - - 3.5 - v4.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - 285212672 - true - 4096 - full - x86 - prompt - false - false - false - false - - - bin\CaF\ - false - - - bin\EDMTestCrate\ - - - - .\alglibnet2.dll - - - - - - System - - - 3.5 - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - Wolfram.NETLink - Wolfram.NETLink.dll - - - SharedCode - {BA0A0540-3F1C-483B-A180-CB78DF424F15} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - Code - - - - Code - - - Code - - - - - Code - - - Code - - - - Code - - - - - Code - - - Code - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - Code - - - Code - - - Code - - - - - - Code - - - Code - - - Code - - - ActiveXPatternGeneratorForm.cs - Designer - - - - PreserveNewest - - - - - - - - - - + + + + Local + 9.0.21022 + 2.0 + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + Debug + AnyCPU + + + + + DAQ + + + JScript + Grid + IE50 + false + Library + DAQ + OnBuildSuccess + + + + + + + 3.5 + v4.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x86 + prompt + false + false + false + false + + + bin\CaF\ + false + + + bin\Nav\ + TRACE;DEBUG + full + true + + + true + bin\x64\Decelerator\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\EDM\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\EDMAnalysis\ + x64 + MinimumRecommendedRules.ruleset + + + true + bin\x64\Buffer\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\Sympathetic\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\SrF\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\BufferClassic\ + DEBUG;TRACE + 285212672 + true + 4096 + full + x64 + prompt + MinimumRecommendedRules.ruleset + false + false + + + bin\x64\CaF\ + x64 + MinimumRecommendedRules.ruleset + + + true + bin\x64\Nav\ + TRACE;DEBUG + full + x64 + MinimumRecommendedRules.ruleset + + + + .\alglibnet2.dll + + + ..\mcl_FreqCounter64.dll + + + + False + ..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies (64-bit)\Current\NationalInstruments.DAQmx.dll + + + False + ..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.VisaNS.dll + + + ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + True + + + System + + + 3.5 + + + System.Data + + + System.Drawing + + + System.Windows.Forms + + + System.XML + + + Wolfram.NETLink + Wolfram.NETLink.dll + + + + + Code + + + + Code + + + Code + + + + + Code + + + Code + + + + Code + + + + + Code + + + Code + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + + + + Code + + + + Code + + + Code + + + ActiveXPatternGeneratorForm.cs + Designer + + + PreserveNewest + + + + + + {ba0a0540-3f1c-483b-a180-cb78df424f15} + SharedCode + + + + + + + + + + + + \ No newline at end of file diff --git a/DAQ/DAQMxPatternGenerator.cs b/DAQ/DAQMxPatternGenerator.cs index f34313ad..5a3cc0ad 100644 --- a/DAQ/DAQMxPatternGenerator.cs +++ b/DAQ/DAQMxPatternGenerator.cs @@ -1,189 +1,193 @@ -using System; -using System.Threading; - -using NationalInstruments.DAQmx; - -using DAQ.Environment; - -namespace DAQ.HAL -{ - /// - /// A class to control the PatternList generator using DAQMx. This class is not horrible, doesn't - /// suffer from huge memory leaks, and doesn't frequently crash the computer. W00t. - /// - public class DAQMxPatternGenerator : PatternGenerator - { - private Task pgTask; - private String device; - private DigitalSingleChannelWriter writer; - private double clockFrequency; - private int length; - // this task is used to generate the sample clock on the "integrated" 6229-type PGs - private Task counterTask; - - public DAQMxPatternGenerator(String device) - { - this.device = device; - } - - // use this method to output a PatternList to the whole PatternList generator - public void OutputPattern(UInt32[] pattern) - { - writer.WriteMultiSamplePort(true, pattern); - // This Sleep is important (or at least it may be). It's here to guarantee that the correct PatternList is - // being output by the time this call returns. This is needed to make the tweak - // and pg scans work correctly. It has the side effect that you have to wait for - // at least one copy of the PatternList to output before you can do anything. This means - // pg scans are slowed down by a factor of two. I can't think of a better way to do - // it at the moment. - // It might be possible to speed it up by understanding the timing of the above call - // - when does it return ? - SleepOnePattern(); - } - - // use this method to output a PatternList to half of the PatternList generator - public void OutputPattern(Int16[] pattern) - { - writer.WriteMultiSamplePort(true, pattern); - // see above - SleepOnePattern(); - } - - private void SleepOnePattern() - { - int sleepTime = (int)(((double)length * 1000) / clockFrequency); - Thread.Sleep(sleepTime); - } - - public void Configure( double clockFrequency, bool loop, bool fullWidth, - bool lowGroup, int length, bool internalClock, bool triggered) - { - this.clockFrequency = clockFrequency; - this.length = length; - - pgTask = new Task("pgTask"); - - /**** Configure the output lines ****/ - - // The underscore notation is the way to address more than 8 of the PatternList generator - // lines at once. This is really buried in the NI-DAQ documentation ! - String chanString = ""; - if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") - { - if (fullWidth) chanString = device + "/port0_32"; - else - { - if (lowGroup) chanString = device + "/port0_16"; - else chanString = device + "/port3_16"; - } - } - // as far as I know you can only address the whole 32-bit port on the 6229 type integrated PatternList generators - if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") - { - chanString = device + "/port0"; - } - - DOChannel doChan = pgTask.DOChannels.CreateChannel( - chanString, - "pg", - ChannelLineGrouping.OneChannelForAllLines - ); - - /**** Configure the clock ****/ - - String clockSource = ""; - if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") - { - if (!internalClock) clockSource = (string)Environment.Environs.Hardware.GetInfo("PGClockLine"); - else clockSource = ""; - } - - if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") - { - // clocking is more complicated for the 6229 style PG boards as they don't have their own internal clock. - - // if external clocking is required it's easy: - if (!internalClock) clockSource = (string)Environment.Environs.Hardware.GetInfo("PGClockLine"); - else - { - // if an internal clock is requested we generate it using the card's timer/counters. - counterTask = new Task(); - counterTask.COChannels.CreatePulseChannelFrequency( - device + (string)Environs.Hardware.GetInfo("PGClockCounter"), - "PG Clock", - COPulseFrequencyUnits.Hertz, - COPulseIdleState.Low, - 0.0, - clockFrequency, - 0.5 - ); - counterTask.Timing.SampleQuantityMode = SampleQuantityMode.ContinuousSamples; - counterTask.Start(); - - clockSource = device + (string)Environs.Hardware.GetInfo("PGClockCounter") + "InternalOutput"; - } - } - - - - /**** Configure regeneration ****/ - - SampleQuantityMode sqm; - if (loop) - { - sqm = SampleQuantityMode.ContinuousSamples; - pgTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration; - - } - else - { - sqm = SampleQuantityMode.FiniteSamples; - pgTask.Stream.WriteRegenerationMode = WriteRegenerationMode.DoNotAllowRegeneration; - - } - - pgTask.Timing.ConfigureSampleClock( - clockSource, - clockFrequency, - SampleClockActiveEdge.Rising, - sqm, - length - ); - - /**** Configure buffering ****/ - - if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") - { - // these lines are critical - without them DAQMx copies the data you provide - // as many times as it can into the on board FIFO (the cited reason being stability). - // This has the annoying side effect that you have to wait for the on board buffer - // to stream out before you can update the patterns - this takes ~6 seconds at 1MHz. - // These lines tell the board and the software to use buffers as close to the size of - // the PatternList as possible (on board buffer size is coerced to be related to a power of - // two, so you don't quite get what you ask for). - // note that 6229 type integrated PGs only have 2kB buffer, so this isn't needed for them (or allowed, in fact) - pgTask.Stream.Buffer.OutputBufferSize = length; - pgTask.Stream.Buffer.OutputOnBoardBufferSize = length; - } - - /**** Configure triggering ****/ - if (triggered) - { - pgTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( - (string)Environs.Hardware.GetInfo("PGTrigger"), - DigitalEdgeStartTriggerEdge.Rising); - } - - /**** Write configuration to board ****/ - - pgTask.Control(TaskAction.Commit); - writer = new DigitalSingleChannelWriter(pgTask.Stream); - } - - public void StopPattern() - { - pgTask.Dispose(); - if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") counterTask.Dispose(); - } - } -} + +using System; +using System.Threading; + +using NationalInstruments.DAQmx; + +using DAQ.Environment; + +namespace DAQ.HAL +{ + /// + /// A class to control the PatternList generator using DAQMx. This class is not horrible, doesn't + /// suffer from huge memory leaks, and doesn't frequently crash the computer. W00t. + /// + public class DAQMxPatternGenerator : PatternGenerator + { + private Task pgTask; + private String device; + private DigitalSingleChannelWriter writer; + private double clockFrequency; + private int length; + // this task is used to generate the sample clock on the "integrated" 6229-type PGs + private Task counterTask; + + public DAQMxPatternGenerator(String device) + { + this.device = device; + } + + // use this method to output a PatternList to the whole PatternList generator + public void OutputPattern(UInt32[] pattern, bool wait) + { + + writer.WriteMultiSamplePort(true, pattern); + // This Sleep is important (or at least it may be). It's here to guarantee that the correct PatternList is + // being output by the time this call returns. This is needed to make the tweak + // and pg scans work correctly. It has the side effect that you have to wait for + // at least one copy of the PatternList to output before you can do anything. This means + // pg scans are slowed down by a factor of two. I can't think of a better way to do + // it at the moment. + // It might be possible to speed it up by understanding the timing of the above call + // - when does it return ? + if (wait) + SleepOnePattern(); + } + public void OutputPattern(UInt32[] pattern) + { + OutputPattern(pattern, true); + } + // use this method to output a PatternList to half of the PatternList generator + public void OutputPattern(Int16[] pattern) + { + writer.WriteMultiSamplePort(true, pattern); + // see above + SleepOnePattern(); + } + + private void SleepOnePattern() + { + int sleepTime = (int)(((double)length * 1000) / clockFrequency); + Thread.Sleep(sleepTime); + } + + public virtual void Configure( double clockFrequency, bool loop, bool fullWidth, + bool lowGroup, int length, bool internalClock, bool triggered) + { + this.clockFrequency = clockFrequency; + this.length = length; + + pgTask = new Task("pgTask"); + + /**** Configure the output lines ****/ + + // The underscore notation is the way to address more than 8 of the PatternList generator + // lines at once. This is really buried in the NI-DAQ documentation ! + String chanString = ""; + if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") + { + if (fullWidth) chanString = device + "/port0_32"; + else + { + if (lowGroup) chanString = device + "/port0_16"; + else chanString = device + "/port3_16"; + } + } + // as far as I know you can only address the whole 32-bit port on the 6229 type integrated PatternList generators + if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") + { + chanString = device + "/port0"; + } + + DOChannel doChan = pgTask.DOChannels.CreateChannel( + chanString, + "pg", + ChannelLineGrouping.OneChannelForAllLines + ); + + /**** Configure the clock ****/ + + String clockSource = ""; + if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") + { + if (!internalClock) clockSource = (string)Environment.Environs.Hardware.GetInfo("PGClockLine"); + else clockSource = ""; + } + + if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") + { + // clocking is more complicated for the 6229 style PG boards as they don't have their own internal clock. + + // if external clocking is required it's easy: + if (!internalClock) clockSource = (string)Environment.Environs.Hardware.GetInfo("PGClockLine"); + else + { + // if an internal clock is requested we generate it using the card's timer/counters. + counterTask = new Task(); + counterTask.COChannels.CreatePulseChannelFrequency( + device + (string)Environs.Hardware.GetInfo("PGClockCounter"), + "PG Clock", + COPulseFrequencyUnits.Hertz, + COPulseIdleState.Low, + 0.0, + clockFrequency, + 0.5 + ); + counterTask.Timing.SampleQuantityMode = SampleQuantityMode.ContinuousSamples; + counterTask.Start(); + + clockSource = device + (string)Environs.Hardware.GetInfo("PGClockCounter") + "InternalOutput"; + } + } + + + + /**** Configure regeneration ****/ + + SampleQuantityMode sqm; + if (loop) + { + sqm = SampleQuantityMode.ContinuousSamples; + pgTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration; + } + else + { + sqm = SampleQuantityMode.FiniteSamples; + pgTask.Stream.WriteRegenerationMode = WriteRegenerationMode.DoNotAllowRegeneration; + } + + pgTask.Timing.ConfigureSampleClock( + clockSource, + clockFrequency, + SampleClockActiveEdge.Rising, + sqm, + length + ); + + /**** Configure buffering ****/ + + if ((string)Environs.Hardware.GetInfo("PGType") == "dedicated") + { + // these lines are critical - without them DAQMx copies the data you provide + // as many times as it can into the on board FIFO (the cited reason being stability). + // This has the annoying side effect that you have to wait for the on board buffer + // to stream out before you can update the patterns - this takes ~6 seconds at 1MHz. + // These lines tell the board and the software to use buffers as close to the size of + // the PatternList as possible (on board buffer size is coerced to be related to a power of + // two, so you don't quite get what you ask for). + // note that 6229 type integrated PGs only have 2kB buffer, so this isn't needed for them (or allowed, in fact) + pgTask.Stream.Buffer.OutputBufferSize = length; + pgTask.Stream.Buffer.OutputOnBoardBufferSize = length; + } + + /**** Configure triggering ****/ + if (triggered) + { + pgTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( + (string)Environs.Hardware.GetInfo("PGTrigger"), + DigitalEdgeStartTriggerEdge.Rising); + } + + /**** Write configuration to board ****/ + + pgTask.Control(TaskAction.Commit); + writer = new DigitalSingleChannelWriter(pgTask.Stream); + } + + public void StopPattern() + { + pgTask.Dispose(); + if ((string)Environs.Hardware.GetInfo("PGType") == "integrated") counterTask.Dispose(); + } + } +} diff --git a/DAQ/DAQmxAnalogPatternGenerator.cs b/DAQ/DAQmxAnalogPatternGenerator.cs index f24e8393..7d12683c 100644 --- a/DAQ/DAQmxAnalogPatternGenerator.cs +++ b/DAQ/DAQmxAnalogPatternGenerator.cs @@ -1,84 +1,102 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Diagnostics; - -using DAQ.Environment; -using DAQ.HAL; -using Data; -using Data.Scans; -using DAQ.Analog; - -using NationalInstruments; -using NationalInstruments.DAQmx; - -namespace DAQ.Analog -{ - public class DAQMxAnalogPatternGenerator - { - Task analogOutputTask; - - public void Configure(AnalogPatternBuilder aPattern, int clockRate) - { - Configure(aPattern, clockRate, false); - } - - public void Configure(AnalogPatternBuilder aPattern, int clockRate, bool loop) - { - analogOutputTask = new Task(); - foreach (string keys in aPattern.AnalogPatterns.Keys) - { - AddToAnalogOutputTask(analogOutputTask, keys); - } - string clockSource = ""; - - SampleQuantityMode sqm; - if(loop) - { - sqm = SampleQuantityMode.ContinuousSamples; - analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration; - - } - else - { - sqm = SampleQuantityMode.FiniteSamples; - analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.DoNotAllowRegeneration; - } - - - analogOutputTask.Timing.ConfigureSampleClock(clockSource, clockRate, - SampleClockActiveEdge.Rising, sqm, - aPattern.PatternLength); - analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( - (string)Environs.Hardware.GetInfo("AOPatternTrigger"), DigitalEdgeStartTriggerEdge.Rising); - - analogOutputTask.Control(TaskAction.Verify); - - } - - public void OutputPatternAndWait(double[,] pattern) - { - AnalogMultiChannelWriter writer = new AnalogMultiChannelWriter(analogOutputTask.Stream); - writer.WriteMultiSample(false, pattern); - analogOutputTask.Start(); - } - - public void StopPattern() - { - analogOutputTask.Stop(); - analogOutputTask.Dispose(); - - } - - #region private methods for creating timed Tasks/channels - - private void AddToAnalogOutputTask(Task task, string channel) - { - AnalogOutputChannel c = ((AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels[channel]); - c.AddToTask(task, c.RangeLow, c.RangeHigh); - } - #endregion - - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Diagnostics; + +using DAQ.Environment; +using DAQ.HAL; +using Data; +using Data.Scans; +using DAQ.Analog; + +using NationalInstruments; +using NationalInstruments.DAQmx; + +namespace DAQ.Analog +{ + public class DAQMxAnalogPatternGenerator + { + Task analogOutputTask; + AnalogMultiChannelWriter writer; + public void Configure(AnalogPatternBuilder aPattern, int clockRate) + { + Configure(aPattern, clockRate, false); + } + + public void Configure(AnalogPatternBuilder aPattern, int clockRate, bool loop) + { + analogOutputTask = new Task(); + foreach (string keys in aPattern.AnalogPatterns.Keys) + { + AddToAnalogOutputTask(analogOutputTask, keys); + } + string clockSource = ""; + + SampleQuantityMode sqm; + if(loop) + { + sqm = SampleQuantityMode.FiniteSamples; + analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.AllowRegeneration; + //analogOutputTask.Triggers.SynchronizationType = TriggerSynchronizationType.Slave; + + } + else + { + sqm = SampleQuantityMode.FiniteSamples; + analogOutputTask.Stream.WriteRegenerationMode = WriteRegenerationMode.DoNotAllowRegeneration; + } + + + analogOutputTask.Timing.ConfigureSampleClock(clockSource, clockRate, + SampleClockActiveEdge.Rising, sqm, + aPattern.PatternLength); + analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( + (string)Environs.Hardware.GetInfo("AOPatternTrigger"), DigitalEdgeStartTriggerEdge.Rising); + + analogOutputTask.Control(TaskAction.Verify); + + } + + public void OutputPatternAndWait(double[,] pattern) + { + if (writer == null) + { + writer = new AnalogMultiChannelWriter(analogOutputTask.Stream); + writer.WriteMultiSample(false, pattern); + } + analogOutputTask.Start(); + } + + public void StopPattern() + { + analogOutputTask.Stop(); + analogOutputTask.Dispose(); + writer = null; + } + public void PauseLoop() + { + analogOutputTask.WaitUntilDone(); + analogOutputTask.Stop(); + + } + public void StartPattern() + { + if (writer == null) throw new Exception("No pattern written to card"); + //analogOutputTask.WaitUntilDone(); + //analogOutputTask.Stop(); + analogOutputTask.Start(); + } + #region private methods for creating timed Tasks/channels + + private void AddToAnalogOutputTask(Task task, string channel) + { + AnalogOutputChannel c = ((AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels[channel]); + c.AddToTask(task, c.RangeLow, c.RangeHigh); + } + #endregion + + + + } +} diff --git a/DAQ/DCSController.cs b/DAQ/DCSController.cs new file mode 100644 index 00000000..37cb2d0a --- /dev/null +++ b/DAQ/DCSController.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Sockets; +using Newtonsoft.Json; + +namespace DAQ.HAL +{ + /// + /// A class to communicate messages to control the MSquared Digital Control System (DCS). This module implements a phase-locked loop to control the phase difference between two lasers. It also synthesises a sequence of pulses used in the Navigator experiment. + /// + public class DCSController : ICEBLOCCommunicator + { + string ipaddress; + int port; + TcpClient client; + + public void Configure(string ipaddress, int port) + { + this.ipaddress = ipaddress; + this.port = port; + } + + public void Enable() + { + try + { + this.client.Connect(this.ipaddress, this.port); + } + catch (SocketException e) + { + throw new Exception("Could Not Connect to the DCS Module. Check ip address and port number."); + } + } + + public void Disable() + { + this.client.Close(); + } + + //TODO Add a method to save settings if needed + public void Save() + { + throw new NotImplementedException(); + } + + //public DCSController(string ipaddress, int port) + //{ + // Configure(ipaddress, port); + // this.client = new TcpClient(); + //} + + public ICEBLOCMessage SendMessage(ICEBLOCMessage message) + { + string json = JsonConvert.SerializeObject(message); + Byte[] data = System.Text.Encoding.ASCII.GetBytes(json); + Byte[] reply = new Byte[data.Length]; + + Enable(); + NetworkStream stream = this.client.GetStream(); + + stream.Write(data, 0, data.Length); + Int32 bytes = stream.Read(reply, 0, data.Length); + + string jsonreply = System.Text.Encoding.ASCII.GetString(reply, 0, bytes); + + stream.Close(); + Disable(); + + return JsonConvert.DeserializeObject(jsonreply); + } + + public void StartLink() + { + Dictionary parameters = new Dictionary(); + parameters["ip_address"] = "192.168.1.1"; + string transmission_id = "[999]"; + string op = "start_link"; + ICEBLOCMessage message = new ICEBLOCMessage(op, transmission_id, parameters); + + ICEBLOCMessage reply = SendMessage(message); + + if (!reply.MessageStatus()) + throw new Exception("Incorrect Start Link Message"); + } + } +} diff --git a/DAQ/DecelerationHardware.cs b/DAQ/DecelerationHardware.cs index 6cb83ddd..f02059b9 100644 --- a/DAQ/DecelerationHardware.cs +++ b/DAQ/DecelerationHardware.cs @@ -1,228 +1,228 @@ -using System; -using System.Collections; - -using NationalInstruments.DAQmx; - -using DAQ.Pattern; -using DAQ.Remoting; -using DAQ.TransferCavityLock2012; -using System.Runtime.Remoting; -using System.Collections.Generic; - -namespace DAQ.HAL -{ - - /// - /// This is the specific hardware that the deceleration experiment has. This class conforms - /// to the Hardware interface. - /// - public class DecelerationHardware : DAQ.HAL.Hardware - { - - public DecelerationHardware() - { - - // YAG laser - yag = new MiniliteLaser(); - - // add the boards - Boards.Add("daq", "/dev2"); - Boards.Add("multiDAQ", "/dev1"); - Boards.Add("pg", "/dev1"); - Boards.Add("aoBoard", "/PXI1Slot5"); - Boards.Add("usbDev", "/dev4"); - //Boards.Add("PXI6", "/PXI1Slot6_4"); - Boards.Add("PXI6", "/PXI1Slot6"); - Boards.Add("PXI4", "/PXI1Slot4"); - Boards.Add("PXI5", "/PXI1Slot5"); - string pgBoard = (string)Boards["pg"]; - string usbBoard = (string)Boards["usbDev"]; - string daqBoard = (string)Boards["daq"]; - string PXIBoard = (string)Boards["PXI6"]; - string TCLBoard = (string)Boards["PXI4"]; - string TCLBoard2 = (string)Boards["PXI6"]; - string aoBoard = (string)Boards["aoBoard"]; - - //configure instance 1 of transfer cavity lock - TCLConfig tcl1 = new TCLConfig("Hamish McCavity"); - tcl1.AddLaser("v00cooling", "p1"); - tcl1.AddLaser("v10repump", "p2"); - tcl1.AddLaser("eylsa", "p3"); - tcl1.Trigger = TCLBoard + "/PFI0"; - tcl1.Cavity = "cavity"; - tcl1.MasterLaser = "master"; - tcl1.Ramp = "rampfb"; - tcl1.TCPChannel = 1190; - Info.Add("Hamish", tcl1); - - //configure instance 2 of transfer cavity lock - TCLConfig tcl2 = new TCLConfig("Carlos the Cavity"); - tcl2.AddLaser("v21repump", "p12"); - tcl2.AddLaser("v32repump", "p22"); - tcl2.Trigger = TCLBoard2 + "/PFI0"; - tcl2.Cavity = "cavity2"; - tcl2.MasterLaser = "master2"; - tcl2.Ramp = "rampfb2"; - tcl2.TCPChannel = 1191; - Info.Add("Carlos", tcl2); - - //MotMaster configuration - MMConfig mmConfig = new MMConfig(false, false, false, false); - mmConfig.ExternalFilePattern = "*.tif"; - Info.Add("MotMasterConfiguration", mmConfig); - - - Instruments.Add("synth", new HP8673BSynth("GPIB0::19::INSTR")); - //Instruments.Add("counter", new HP5350BCounter("GPIB0::14::INSTR")); - - //Instruments.Add("flowmeter", new FlowMeter("ASRL1::INSTR")); - - - //VCO lock - //AddAnalogOutputChannel("VCO_Out", PXIBoard + "/ao12", 0.0, 10.0); - - // add things to the info - Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); - Info.Add("PatternGeneratorBoard", pgBoard); - Info.Add("PGType", "dedicated"); - Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); - - Info.Add("defaultTOFRange", new double[] {4000, 12000}); // these entries are the two ends of the range for the upper TOF graph - Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph - Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph) - - - // the analog triggers - Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0");// pin 11 - Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1");// pin 10 - //Info.Add("TCLTrigger", (string)Boards["PXI4"] + "/PFI0"); - //Info.Add("analogTrigger2", (string)Boards["usbDev"] + "/PFI0"); //Pin 29 - Info.Add("analogTrigger3", (string)Boards["daq"] + "/PFI6"); //Pin 5 - breakout 31 - Info.Add("usbAnalogTrigger", usbBoard + "/PFI0"); - //distance information - Info.Add("sourceToDetect", 0.535); //in m - Info.Add("sourceToSoftwareDecelerator", 0.12); //in m - //information about the molecule - Info.Add("molecule", "caf"); - Info.Add("Element", "CaF"); - Info.Add("moleculeMass", 58.961); // this is 40CaF in atomic mass units - Info.Add("moleculeRotationalConstant", 1.02675E10); //in Hz - Info.Add("moleculeDipoleMoment", 15400.0); //in Hz/(V/m) - //information about the decelerator - - //These settings for WF - Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.V_H); //Vertical first - Info.Add("deceleratorLensSpacing", 0.006); - Info.Add("deceleratorFieldMap", "RodLayout3_EonAxis.dat"); - Info.Add("mapPoints", 121); - Info.Add("mapStartPoint", 0.0); - Info.Add("mapResolution", 0.0001); - - // These settings for AG - // Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.H_V); //Horizontal first - // Info.Add("deceleratorLensSpacing", 0.024); - // Info.Add("deceleratorFieldMap", "Section1v1_onAxisFieldTemplate.dat"); - // Info.Add("mapPoints", 481); - // Info.Add("mapStartPoint", 0.0); - // Info.Add("mapResolution", 0.0001); - - //Here are constants for 174YbF for future reference - //Info.Add("molecule", "ybf"); - //Info.Add("moleculeMass", 192.937); // this is 174YbF in atomic mass units - //Info.Add("moleculeRotationalConstant", 7.2338E9); //in Hz - //Info.Add("moleculeDipoleMoment", 19700.0); //in Hz/(V/m) - - // map the digital channels - AddDigitalOutputChannel("valve", pgBoard, 0, 6); - AddDigitalOutputChannel("tclBlock", pgBoard, 0, 6); //Same as valve; deliberately! - AddDigitalOutputChannel("flash", pgBoard, 0, 0);//Changed from pg board P.0.5 because that appears to have died mysteriously (line dead in ribbon cable?) TEW 06/04/09 - AddDigitalOutputChannel("q", pgBoard, 0,2 ); - AddDigitalOutputChannel("chirpTrigger", pgBoard, 1, 0); - AddDigitalOutputChannel("detector", pgBoard, 3, 7); - AddDigitalOutputChannel("detectorprime", pgBoard, 3, 6); - AddDigitalOutputChannel("aom", pgBoard, 2, 1);//Same channel as "ttl2" as used by the AomLevelControlPlugin. Now commented out. - AddDigitalOutputChannel("aom2", pgBoard, 1, 6); // Pin 21 of PG board. Output 31 of front panel - AddDigitalOutputChannel("ttlSwitch", pgBoard, 2,2); // This is the output that the pg will switch if it's switch scanning. - //AddDigitalOutputChannel("digitalSwitchChannel", pgBoard, 2, 2); - AddDigitalOutputChannel("motAOM", pgBoard, 1, 1); //Pin 17 - AddDigitalOutputChannel("motRampTrigger", pgBoard, 1, 2); //Pin 51 - AddDigitalOutputChannel("bTrigger", pgBoard, 1, 3); //Pin 52 - AddDigitalOutputChannel("cameraTrigger", pgBoard, 0, 4); // Pin 13 - AddDigitalOutputChannel("AnalogPatternTrigger", pgBoard, 3, 3); //Pin 31 - - // map the analog channels - AddAnalogInputChannel("pmt", daqBoard + "/ai0", AITerminalConfiguration.Rse); - AddAnalogInputChannel("pmt2", daqBoard + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("refcavity", daqBoard + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("lockcavity", daqBoard + "/ai2", AITerminalConfiguration.Rse); - - AddAnalogInputChannel("master", TCLBoard + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("cavity", TCLBoard + "/ai15", AITerminalConfiguration.Rse); - AddAnalogInputChannel("p1", TCLBoard + "/ai3", AITerminalConfiguration.Rse); - AddAnalogInputChannel("p2", TCLBoard + "/ai10", AITerminalConfiguration.Rse); - AddAnalogInputChannel("p3", TCLBoard + "/ai4", AITerminalConfiguration.Rse); - - AddAnalogOutputChannel("v10repump", TCLBoard + "/ao0"); - AddAnalogOutputChannel("rampfb", TCLBoard + "/ao1"); - - AddAnalogOutputChannel("v00cooling", TCLBoard2 + "/ao2"); - AddAnalogOutputChannel("eylsa", TCLBoard2 + "/ao3"); - - AddAnalogOutputChannel("slowingChirp", aoBoard + "/ao8"); - AddAnalogOutputChannel("v0IntensityRamp", aoBoard + "/ao9"); - - //second cavity - - AddAnalogInputChannel("master2", TCLBoard2 + "/ai0", AITerminalConfiguration.Rse); - AddAnalogInputChannel("cavity2", TCLBoard2 + "/ai4", AITerminalConfiguration.Rse); - AddAnalogInputChannel("p12", TCLBoard2 + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("p22", TCLBoard2 + "/ai2", AITerminalConfiguration.Rse); - AddAnalogOutputChannel("v21repump", TCLBoard2 + "/ao0"); - AddAnalogOutputChannel("v32repump", usbBoard + "/ao0", 0 , 5); - AddAnalogOutputChannel("rampfb2", TCLBoard2 + "/ao1"); - - - - - // map the counter channels - AddCounterChannel("pmt", daqBoard + "/ctr0"); - AddCounterChannel("sample clock", daqBoard + "/ctr1"); - - //map the monitoring source chamber in deceleration hardware - AddAnalogInputChannel("RoughVacuum", PXIBoard + "/ai0", AITerminalConfiguration.Rse); - AddAnalogInputChannel("PressureSourceChamber", PXIBoard + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("VoltageReference", PXIBoard + "/ai2", AITerminalConfiguration.Rse); - AddAnalogInputChannel("10KThermistor30KPlate", PXIBoard + "/ai3", AITerminalConfiguration.Rse); - AddAnalogInputChannel("30KShield", PXIBoard + "/ai4", AITerminalConfiguration.Rse); - AddAnalogInputChannel("4KCell", PXIBoard + "/ai5", AITerminalConfiguration.Rse); - - //map the channels to monitor the sidebands in deceleration hardware - AddAnalogInputChannel("cavityVoltage", usbBoard + "/ai0", AITerminalConfiguration.Rse); - AddAnalogInputChannel("mot606", usbBoard + "/ai1", AITerminalConfiguration.Rse); - AddAnalogInputChannel("mot628V1", usbBoard + "/ai2", AITerminalConfiguration.Rse); - AddAnalogInputChannel("mot628V2", usbBoard + "/ai3", AITerminalConfiguration.Rse); - //AddAnalogInputChannel("mot628V3", usbBoard + "/ai4", AITerminalConfiguration.Rse); - AddAnalogInputChannel("slowing531", usbBoard + "/ai4", AITerminalConfiguration.Rse); - AddAnalogInputChannel("slowing628V1", usbBoard + "/ai7", AITerminalConfiguration.Rse); - - //analog output channels controlled by the hardware controller and/or MOTMaster - AddAnalogOutputChannel("motAOMFreq", aoBoard + "/ao10"); - AddAnalogOutputChannel("motAOMAmp", aoBoard + "/ao11"); - - AddCalibration("motAOMFreq", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150 - AddCalibration("motAOMAmp", new LinearCalibration(1, 0, 0, -10, 10)); // needs calibrating - - } - - - public override void ConnectApplications() - { - RemotingHelper.ConnectDecelerationHardwareControl(); - // ask the remoting system for access to TCL2012 - // Type t = Type.GetType("TransferCavityLock2012.Controller, TransferCavityLock"); - // RemotingConfiguration.RegisterWellKnownClientType(t, "tcp://localhost:1190/controller.rem"); - - } - - } -} +using System; +using System.Collections; + +using NationalInstruments.DAQmx; + +using DAQ.Pattern; +using DAQ.Remoting; +using DAQ.TransferCavityLock2012; +using System.Runtime.Remoting; +using System.Collections.Generic; + +namespace DAQ.HAL +{ + + /// + /// This is the specific hardware that the deceleration experiment has. This class conforms + /// to the Hardware interface. + /// + public class DecelerationHardware : DAQ.HAL.Hardware + { + + public DecelerationHardware() + { + + // YAG laser + yag = new MiniliteLaser(); + + // add the boards + Boards.Add("daq", "/dev2"); + Boards.Add("multiDAQ", "/dev1"); + Boards.Add("pg", "/dev1"); + Boards.Add("aoBoard", "/PXI1Slot5"); + Boards.Add("usbDev", "/dev4"); + //Boards.Add("PXI6", "/PXI1Slot6_4"); + Boards.Add("PXI6", "/PXI1Slot6"); + Boards.Add("PXI4", "/PXI1Slot4"); + Boards.Add("PXI5", "/PXI1Slot5"); + string pgBoard = (string)Boards["pg"]; + string usbBoard = (string)Boards["usbDev"]; + string daqBoard = (string)Boards["daq"]; + string PXIBoard = (string)Boards["PXI6"]; + string TCLBoard = (string)Boards["PXI4"]; + string TCLBoard2 = (string)Boards["PXI6"]; + string aoBoard = (string)Boards["aoBoard"]; + + //configure instance 1 of transfer cavity lock + TCLConfig tcl1 = new TCLConfig("Hamish McCavity"); + tcl1.AddLaser("v00cooling", "p1"); + tcl1.AddLaser("v10repump", "p2"); + tcl1.AddLaser("eylsa", "p3"); + tcl1.Trigger = TCLBoard + "/PFI0"; + tcl1.Cavity = "cavity"; + tcl1.MasterLaser = "master"; + tcl1.Ramp = "rampfb"; + tcl1.TCPChannel = 1190; + Info.Add("Hamish", tcl1); + + //configure instance 2 of transfer cavity lock + TCLConfig tcl2 = new TCLConfig("Carlos the Cavity"); + tcl2.AddLaser("v21repump", "p12"); + tcl2.AddLaser("v32repump", "p22"); + tcl2.Trigger = TCLBoard2 + "/PFI0"; + tcl2.Cavity = "cavity2"; + tcl2.MasterLaser = "master2"; + tcl2.Ramp = "rampfb2"; + tcl2.TCPChannel = 1191; + Info.Add("Carlos", tcl2); + + //MotMaster configuration + MMConfig mmConfig = new MMConfig(false, false, false, false); + mmConfig.ExternalFilePattern = "*.tif"; + Info.Add("MotMasterConfiguration", mmConfig); + + + Instruments.Add("synth", new HP8673BSynth("GPIB0::19::INSTR")); + //Instruments.Add("counter", new HP5350BCounter("GPIB0::14::INSTR")); + + //Instruments.Add("flowmeter", new FlowMeter("ASRL1::INSTR")); + + + //VCO lock + //AddAnalogOutputChannel("VCO_Out", PXIBoard + "/ao12", 0.0, 10.0); + + // add things to the info + Info.Add("PGClockLine", Boards["pg"] + "/PFI2"); + Info.Add("PatternGeneratorBoard", pgBoard); + Info.Add("PGType", "dedicated"); + Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); + + Info.Add("defaultTOFRange", new double[] {4000, 12000}); // these entries are the two ends of the range for the upper TOF graph + Info.Add("defaultTOF2Range", new double[] { 0, 1000 }); // these entries are the two ends of the range for the middle TOF graph + Info.Add("defaultGate", new double[] { 6000, 2000 }); // the first entry is the centre of the gate, the second is the half width of the gate (upper TOF graph) + + + // the analog triggers + Info.Add("analogTrigger0", (string)Boards["daq"] + "/PFI0");// pin 11 + Info.Add("analogTrigger1", (string)Boards["daq"] + "/PFI1");// pin 10 + //Info.Add("TCLTrigger", (string)Boards["PXI4"] + "/PFI0"); + //Info.Add("analogTrigger2", (string)Boards["usbDev"] + "/PFI0"); //Pin 29 + Info.Add("analogTrigger3", (string)Boards["daq"] + "/PFI6"); //Pin 5 - breakout 31 + Info.Add("usbAnalogTrigger", usbBoard + "/PFI0"); + //distance information + Info.Add("sourceToDetect", 0.535); //in m + Info.Add("sourceToSoftwareDecelerator", 0.12); //in m + //information about the molecule + Info.Add("molecule", "caf"); + Info.Add("Element", "CaF"); + Info.Add("moleculeMass", 58.961); // this is 40CaF in atomic mass units + Info.Add("moleculeRotationalConstant", 1.02675E10); //in Hz + Info.Add("moleculeDipoleMoment", 15400.0); //in Hz/(V/m) + //information about the decelerator + + //These settings for WF + Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.V_H); //Vertical first + Info.Add("deceleratorLensSpacing", 0.006); + Info.Add("deceleratorFieldMap", "RodLayout3_EonAxis.dat"); + Info.Add("mapPoints", 121); + Info.Add("mapStartPoint", 0.0); + Info.Add("mapResolution", 0.0001); + + // These settings for AG + // Info.Add("deceleratorStructure", DecelerationConfig.DecelerationExperiment.SwitchStructure.H_V); //Horizontal first + // Info.Add("deceleratorLensSpacing", 0.024); + // Info.Add("deceleratorFieldMap", "Section1v1_onAxisFieldTemplate.dat"); + // Info.Add("mapPoints", 481); + // Info.Add("mapStartPoint", 0.0); + // Info.Add("mapResolution", 0.0001); + + //Here are constants for 174YbF for future reference + //Info.Add("molecule", "ybf"); + //Info.Add("moleculeMass", 192.937); // this is 174YbF in atomic mass units + //Info.Add("moleculeRotationalConstant", 7.2338E9); //in Hz + //Info.Add("moleculeDipoleMoment", 19700.0); //in Hz/(V/m) + + // map the digital channels + AddDigitalOutputChannel("valve", pgBoard, 0, 6); + AddDigitalOutputChannel("tclBlock", pgBoard, 0, 6); //Same as valve; deliberately! + AddDigitalOutputChannel("flash", pgBoard, 0, 0);//Changed from pg board P.0.5 because that appears to have died mysteriously (line dead in ribbon cable?) TEW 06/04/09 + AddDigitalOutputChannel("q", pgBoard, 0,2 ); + AddDigitalOutputChannel("chirpTrigger", pgBoard, 1, 0); + AddDigitalOutputChannel("detector", pgBoard, 3, 7); + AddDigitalOutputChannel("detectorprime", pgBoard, 3, 6); + AddDigitalOutputChannel("aom", pgBoard, 2, 1);//Same channel as "ttl2" as used by the AomLevelControlPlugin. Now commented out. + AddDigitalOutputChannel("aom2", pgBoard, 1, 6); // Pin 21 of PG board. Output 31 of front panel + AddDigitalOutputChannel("ttlSwitch", pgBoard, 2,2); // This is the output that the pg will switch if it's switch scanning. + //AddDigitalOutputChannel("digitalSwitchChannel", pgBoard, 2, 2); + AddDigitalOutputChannel("motAOM", pgBoard, 1, 1); //Pin 17 + AddDigitalOutputChannel("motRampTrigger", pgBoard, 1, 2); //Pin 51 + AddDigitalOutputChannel("bTrigger", pgBoard, 1, 3); //Pin 52 + AddDigitalOutputChannel("cameraTrigger", pgBoard, 0, 4); // Pin 13 + AddDigitalOutputChannel("AnalogPatternTrigger", pgBoard, 3, 3); //Pin 31 + + // map the analog channels + AddAnalogInputChannel("pmt", daqBoard + "/ai0", AITerminalConfiguration.Rse); + AddAnalogInputChannel("pmt2", daqBoard + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("refcavity", daqBoard + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("lockcavity", daqBoard + "/ai2", AITerminalConfiguration.Rse); + + AddAnalogInputChannel("master", TCLBoard + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("cavity", TCLBoard + "/ai15", AITerminalConfiguration.Rse); + AddAnalogInputChannel("p1", TCLBoard + "/ai3", AITerminalConfiguration.Rse); + AddAnalogInputChannel("p2", TCLBoard + "/ai10", AITerminalConfiguration.Rse); + AddAnalogInputChannel("p3", TCLBoard + "/ai4", AITerminalConfiguration.Rse); + + AddAnalogOutputChannel("v10repump", TCLBoard + "/ao0"); + AddAnalogOutputChannel("rampfb", TCLBoard + "/ao1"); + + AddAnalogOutputChannel("v00cooling", TCLBoard2 + "/ao2"); + AddAnalogOutputChannel("eylsa", TCLBoard2 + "/ao3"); + + AddAnalogOutputChannel("slowingChirp", aoBoard + "/ao8"); + AddAnalogOutputChannel("v0IntensityRamp", aoBoard + "/ao9"); + + //second cavity + + AddAnalogInputChannel("master2", TCLBoard2 + "/ai0", AITerminalConfiguration.Rse); + AddAnalogInputChannel("cavity2", TCLBoard2 + "/ai4", AITerminalConfiguration.Rse); + AddAnalogInputChannel("p12", TCLBoard2 + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("p22", TCLBoard2 + "/ai2", AITerminalConfiguration.Rse); + AddAnalogOutputChannel("v21repump", TCLBoard2 + "/ao0"); + AddAnalogOutputChannel("v32repump", usbBoard + "/ao0", 0 , 5); + AddAnalogOutputChannel("rampfb2", TCLBoard2 + "/ao1"); + + + + + // map the counter channels + AddCounterChannel("pmt", daqBoard + "/ctr0"); + AddCounterChannel("sample clock", daqBoard + "/ctr1"); + + //map the monitoring source chamber in deceleration hardware + AddAnalogInputChannel("RoughVacuum", PXIBoard + "/ai0", AITerminalConfiguration.Rse); + AddAnalogInputChannel("PressureSourceChamber", PXIBoard + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("VoltageReference", PXIBoard + "/ai2", AITerminalConfiguration.Rse); + AddAnalogInputChannel("10KThermistor30KPlate", PXIBoard + "/ai3", AITerminalConfiguration.Rse); + AddAnalogInputChannel("30KShield", PXIBoard + "/ai4", AITerminalConfiguration.Rse); + AddAnalogInputChannel("4KCell", PXIBoard + "/ai5", AITerminalConfiguration.Rse); + + //map the channels to monitor the sidebands in deceleration hardware + AddAnalogInputChannel("cavityVoltage", usbBoard + "/ai0", AITerminalConfiguration.Rse); + AddAnalogInputChannel("mot606", usbBoard + "/ai1", AITerminalConfiguration.Rse); + AddAnalogInputChannel("mot628V1", usbBoard + "/ai2", AITerminalConfiguration.Rse); + AddAnalogInputChannel("mot628V2", usbBoard + "/ai3", AITerminalConfiguration.Rse); + //AddAnalogInputChannel("mot628V3", usbBoard + "/ai4", AITerminalConfiguration.Rse); + AddAnalogInputChannel("slowing531", usbBoard + "/ai4", AITerminalConfiguration.Rse); + AddAnalogInputChannel("slowing628V1", usbBoard + "/ai7", AITerminalConfiguration.Rse); + + //analog output channels controlled by the hardware controller and/or MOTMaster + AddAnalogOutputChannel("motAOMFreq", aoBoard + "/ao10"); + AddAnalogOutputChannel("motAOMAmp", aoBoard + "/ao11"); + + AddCalibration("motAOMFreq", new PolynomialCalibration(new double[] { -9.7727, 0.16604, -0.0000272 }, 70, 130)); //this is a quadratic fit to the manufacturer's data for a POS-150 + AddCalibration("motAOMAmp", new LinearCalibration(1, 0, 0, -10, 10)); // needs calibrating + + } + + + public override void ConnectApplications() + { + RemotingHelper.ConnectDecelerationHardwareControl(); + // ask the remoting system for access to TCL2012 + // Type t = Type.GetType("TransferCavityLock2012.Controller, TransferCavityLock"); + // RemotingConfiguration.RegisterWellKnownClientType(t, "tcp://localhost:1190/controller.rem"); + + } + + } +} diff --git a/DAQ/DigitalOutputChannel.cs b/DAQ/DigitalOutputChannel.cs index eaefa014..275e3031 100644 --- a/DAQ/DigitalOutputChannel.cs +++ b/DAQ/DigitalOutputChannel.cs @@ -13,7 +13,7 @@ public class DigitalOutputChannel : DAQMxChannel { private string device; private int port; - private int line; + public int line; public DigitalOutputChannel( string name, string device, int port, int line ) { @@ -38,5 +38,9 @@ public void AddToTask(Task task) ChannelLineGrouping.OneChannelForAllLines ); } + public string Device + { + get { return device; } + } } } diff --git a/DAQ/EDMTestCrateFileSystem.cs b/DAQ/EDMTestCrateFileSystem.cs index 18ff14d4..061e7701 100644 --- a/DAQ/EDMTestCrateFileSystem.cs +++ b/DAQ/EDMTestCrateFileSystem.cs @@ -1,14 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace DAQ -{ - class EDMTestCrateFileSystem : DAQ.Environment.FileSystem - { - public EDMTestCrateFileSystem() - { - - } - } -} +using System; +using System.Collections.Generic; +using System.Text; + +namespace DAQ +{ + class EDMTestCrateFileSystem : DAQ.Environment.FileSystem + { + public EDMTestCrateFileSystem() + { + + } + } +} diff --git a/DAQ/EDMTestCrateHardware.cs b/DAQ/EDMTestCrateHardware.cs index 9e42721f..7c85989b 100644 --- a/DAQ/EDMTestCrateHardware.cs +++ b/DAQ/EDMTestCrateHardware.cs @@ -1,34 +1,34 @@ -using System; -using System.Collections; -using System.Runtime.Remoting; -using NationalInstruments.DAQmx; - -using DAQ.Pattern; -using System.Collections.Generic; -using DAQ.TransferCavityLock2012; -using DAQ.Remoting; - -namespace DAQ.HAL -{ - /// - /// This is the specific hardware that the edm test crate has. This class conforms - /// to the Hardware interface. - /// - public class EDMTestCrateHardware : DAQ.HAL.Hardware - { - public override void ConnectApplications() - { - - } - - - public EDMTestCrateHardware() - { - - // add the boards - Boards.Add("rfPulseGenerator", "Dev2"); - - } - - } +using System; +using System.Collections; +using System.Runtime.Remoting; +using NationalInstruments.DAQmx; + +using DAQ.Pattern; +using System.Collections.Generic; +using DAQ.TransferCavityLock2012; +using DAQ.Remoting; + +namespace DAQ.HAL +{ + /// + /// This is the specific hardware that the edm test crate has. This class conforms + /// to the Hardware interface. + /// + public class EDMTestCrateHardware : DAQ.HAL.Hardware + { + public override void ConnectApplications() + { + + } + + + public EDMTestCrateHardware() + { + + // add the boards + Boards.Add("rfPulseGenerator", "Dev2"); + + } + + } } \ No newline at end of file diff --git a/DAQ/Environs.cs b/DAQ/Environs.cs index 56af84d3..79d2f0d0 100644 --- a/DAQ/Environs.cs +++ b/DAQ/Environs.cs @@ -213,7 +213,28 @@ static Environs() Debug = false; break; - default: + case "NAVIGATOR-ANAL": + Hardware = new NavigatorHardware(); + FileSystem = new NavigatorFileSystem(); + Debug = false; + break; + + case "PH-LAB-015": + Debug = true; + Hardware = new NavigatorHardware(); + FileSystem = new NavigatorFileSystem(); + break; + case "JIMMY-SURFACE": + Debug = true; + Hardware = new NavigatorHardware(); + FileSystem = new NavigatorFileSystem(); + break; + case "DESKTOP-U334RMA": + Debug = true; + Hardware = new NavigatorHardware(); + FileSystem = new NavigatorFileSystem(); + break; + default: Hardware = new EDMHardware(); FileSystem = new FileSystem(); Debug = true; diff --git a/DAQ/Fitter.cs b/DAQ/Fitter.cs index b7c41bf1..7dbb1d92 100644 --- a/DAQ/Fitter.cs +++ b/DAQ/Fitter.cs @@ -1,112 +1,112 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DAQ.Analyze -{ - /// - /// This class uses is the bsae class for fitters. A fitter is specialized to a particular fitting - /// function by deriving from this class and overriding abtract methods to provide the function's - /// value, initial parameter estimates, and a parameter report. This class takes care of the mechanics - /// of doing the fit and providing fitted data. - /// - public abstract class Fitter - { - public string Name; - double[] fittedValues; - protected double[] lastFittedParameters; - double[] lastFittedValues; - - // Fit the data provided. The parameters list should contain an initial - // guess. On return it will contain the fitted parameters. - public void Fit(double[] xdata, double[] ydata, double[] parameters) - { - try - { - // massage the x-data into the format alglib likes - double[,] xDataAlg = new double[xdata.Length, 1]; - - for (int i = 0; i < xdata.Length; i++) xDataAlg[i,0] = xdata[i]; - double epsf = 0; - double epsx = 0.000000001; - int maxits = 0; - int info; - alglib.lsfitstate state; - alglib.lsfitreport rep; - double diffstep = 0.001; - alglib.lsfitcreatef(xDataAlg, ydata, parameters, diffstep, out state); - alglib.lsfitsetcond(state, epsf, epsx, maxits); - alglib.lsfitfit(state, model, null, null); - alglib.lsfitresults(state, out info, out parameters, out rep); - - //calculate the fitted values - fittedValues = new double[xdata.Length]; - for (int i = 0; i < xdata.Length; i++) - { - double yValue = 0; - double[] xValueArr = new double[] { xdata[i] }; - model(parameters, xValueArr, ref yValue, null); - fittedValues[i] = yValue; - } - - // save the fitted values, in case the fit fails next time - if (Double.IsNaN(fittedValues[0])) repairFittedValues(xdata, ydata); - lastFittedValues = fittedValues; - lastFittedParameters = parameters; - } - catch (Exception e) - { - // need to fill the data array with something if the fit method fails - repairFittedValues(xdata, ydata); - lastFittedParameters = new double[parameters.Length]; - Console.WriteLine(e.ToString()); - } - - } - - private void repairFittedValues(double[] xdata, double[] ydata) - { - // need to fill the data array with something if the fit method fails - if (lastFittedValues != null) - { - int lfvLength = lastFittedValues.Length; - Array.Resize(ref lastFittedValues, ydata.Length); - fittedValues = lastFittedValues; - for (int i = lfvLength; i < fittedValues.Length; i++) - fittedValues[i] = fittedValues[lfvLength - 1]; - } - else - { - fittedValues = new double[ydata.Length]; - for (int i = 0; i < ydata.Length; i++) fittedValues[i] = 1; - - - } - } - - public abstract double[] SuggestParameters(double[] xDat, double[] yDat, double scanStart, double scanEnd); - - public abstract string ParameterReport - { - get; - } - - // This returns the y-values for the model at the x-data points it was evaluated at. - public double[] FittedValues - { - get - { - return fittedValues; - } - } - - public override string ToString() - { - return Name; - } - - - protected alglib.ndimensional_pfunc model; - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace DAQ.Analyze +{ + /// + /// This class uses is the bsae class for fitters. A fitter is specialized to a particular fitting + /// function by deriving from this class and overriding abtract methods to provide the function's + /// value, initial parameter estimates, and a parameter report. This class takes care of the mechanics + /// of doing the fit and providing fitted data. + /// + public abstract class Fitter + { + public string Name; + double[] fittedValues; + protected double[] lastFittedParameters; + double[] lastFittedValues; + + // Fit the data provided. The parameters list should contain an initial + // guess. On return it will contain the fitted parameters. + public void Fit(double[] xdata, double[] ydata, double[] parameters) + { + try + { + // massage the x-data into the format alglib likes + double[,] xDataAlg = new double[xdata.Length, 1]; + + for (int i = 0; i < xdata.Length; i++) xDataAlg[i,0] = xdata[i]; + double epsf = 0; + double epsx = 0.000000001; + int maxits = 0; + int info; + alglib.lsfitstate state; + alglib.lsfitreport rep; + double diffstep = 0.001; + alglib.lsfitcreatef(xDataAlg, ydata, parameters, diffstep, out state); + alglib.lsfitsetcond(state, epsf, epsx, maxits); + alglib.lsfitfit(state, model, null, null); + alglib.lsfitresults(state, out info, out parameters, out rep); + + //calculate the fitted values + fittedValues = new double[xdata.Length]; + for (int i = 0; i < xdata.Length; i++) + { + double yValue = 0; + double[] xValueArr = new double[] { xdata[i] }; + model(parameters, xValueArr, ref yValue, null); + fittedValues[i] = yValue; + } + + // save the fitted values, in case the fit fails next time + if (Double.IsNaN(fittedValues[0])) repairFittedValues(xdata, ydata); + lastFittedValues = fittedValues; + lastFittedParameters = parameters; + } + catch (Exception e) + { + // need to fill the data array with something if the fit method fails + repairFittedValues(xdata, ydata); + lastFittedParameters = new double[parameters.Length]; + Console.WriteLine(e.ToString()); + } + + } + + private void repairFittedValues(double[] xdata, double[] ydata) + { + // need to fill the data array with something if the fit method fails + if (lastFittedValues != null) + { + int lfvLength = lastFittedValues.Length; + Array.Resize(ref lastFittedValues, ydata.Length); + fittedValues = lastFittedValues; + for (int i = lfvLength; i < fittedValues.Length; i++) + fittedValues[i] = fittedValues[lfvLength - 1]; + } + else + { + fittedValues = new double[ydata.Length]; + for (int i = 0; i < ydata.Length; i++) fittedValues[i] = 1; + + + } + } + + public abstract double[] SuggestParameters(double[] xDat, double[] yDat, double scanStart, double scanEnd); + + public abstract string ParameterReport + { + get; + } + + // This returns the y-values for the model at the x-data points it was evaluated at. + public double[] FittedValues + { + get + { + return fittedValues; + } + } + + public override string ToString() + { + return Name; + } + + + protected alglib.ndimensional_pfunc model; + } +} diff --git a/DAQ/GaussianFitter.cs b/DAQ/GaussianFitter.cs index dec894db..9d152438 100644 --- a/DAQ/GaussianFitter.cs +++ b/DAQ/GaussianFitter.cs @@ -1,53 +1,53 @@ -using System; - - -namespace DAQ.Analyze -{ - /// - /// A class to fit Gaussians. Note that the standard normalised definition of - /// the Gaussian is not used, rather one that has a peak height of 1 is used. - /// This makes the estimated amplitude parameter more meaningful (i.e. it's the - /// height of the peak). The w parameter that is returned is the FWHM. Again, this - /// is slightly different to the usual definition of the Gaussian. - /// - public class GaussianFitter : DAQ.Analyze.PeakFitter - { - - public GaussianFitter() - { - Name = "Gaussian"; - model = gaussian; - } - - // takes the parameters (in this order, in the double[]) - // N: background - // Q: signal - // c: centre - // w: width - protected void gaussian(double[] parameters, double[] x, ref double func, object obj) - { - double n = parameters[0]; - double q = parameters[1]; - double c = parameters[2]; - double w = parameters[3]; - if (w == 0) w = 0.001; // watch out for divide by zero - func = n + q * Math.Exp(-Math.Pow(x[0] - c, 2) / ((2 / 5.52) * Math.Pow(w, 2))); - } - - public override string ParameterReport - { - get - { - return "n: " + lastFittedParameters[0].ToString("G3") + - " q: " + lastFittedParameters[1].ToString("G3") + - " c: " + lastFittedParameters[2].ToString("G6") + - " w: " + lastFittedParameters[3].ToString("G3"); - } - } - - public double returncenter() - { - return lastFittedParameters[2]; - } - } -} +using System; + + +namespace DAQ.Analyze +{ + /// + /// A class to fit Gaussians. Note that the standard normalised definition of + /// the Gaussian is not used, rather one that has a peak height of 1 is used. + /// This makes the estimated amplitude parameter more meaningful (i.e. it's the + /// height of the peak). The w parameter that is returned is the FWHM. Again, this + /// is slightly different to the usual definition of the Gaussian. + /// + public class GaussianFitter : DAQ.Analyze.PeakFitter + { + + public GaussianFitter() + { + Name = "Gaussian"; + model = gaussian; + } + + // takes the parameters (in this order, in the double[]) + // N: background + // Q: signal + // c: centre + // w: width + protected void gaussian(double[] parameters, double[] x, ref double func, object obj) + { + double n = parameters[0]; + double q = parameters[1]; + double c = parameters[2]; + double w = parameters[3]; + if (w == 0) w = 0.001; // watch out for divide by zero + func = n + q * Math.Exp(-Math.Pow(x[0] - c, 2) / ((2 / 5.52) * Math.Pow(w, 2))); + } + + public override string ParameterReport + { + get + { + return "n: " + lastFittedParameters[0].ToString("G3") + + " q: " + lastFittedParameters[1].ToString("G3") + + " c: " + lastFittedParameters[2].ToString("G6") + + " w: " + lastFittedParameters[3].ToString("G3"); + } + } + + public double returncenter() + { + return lastFittedParameters[2]; + } + } +} diff --git a/DAQ/HP5350BCounter.cs b/DAQ/HP5350BCounter.cs index 791c6c3f..10970398 100644 --- a/DAQ/HP5350BCounter.cs +++ b/DAQ/HP5350BCounter.cs @@ -1,47 +1,47 @@ -using System; - - -using DAQ.Environment; - -namespace DAQ.HAL -{ - /// - /// This class represents a GPIB controlled HP5350B rf counter. It conforms to the Counter - /// interface. - /// - public class HP5350BCounter : FrequencyCounter - { - private char[] delimiterChars = { ' ', '\r', '\n' }; - - public HP5350BCounter(String visaAddress) : base(visaAddress) - {} - - public override void Connect() - { - base.Connect(); - TerminationCharacter(true); - } - - private double tempFreq = 0.0; - override public double Frequency - { - get - { - if (!Environs.Debug) - { - double val; - Write("trg"); - string s = Read(); - double.TryParse(s, out val); - if (val < 20E9) tempFreq = val; // Range of counter is 20 GHz - } - return tempFreq; - } - } - - public override double Amplitude - { - get { throw new Exception("The method or operation is not implemented."); } - } - } -} +using System; + + +using DAQ.Environment; + +namespace DAQ.HAL +{ + /// + /// This class represents a GPIB controlled HP5350B rf counter. It conforms to the Counter + /// interface. + /// + public class HP5350BCounter : FrequencyCounter + { + private char[] delimiterChars = { ' ', '\r', '\n' }; + + public HP5350BCounter(String visaAddress) : base(visaAddress) + {} + + public override void Connect() + { + base.Connect(); + TerminationCharacter(true); + } + + private double tempFreq = 0.0; + override public double Frequency + { + get + { + if (!Environs.Debug) + { + double val; + Write("trg"); + string s = Read(); + double.TryParse(s, out val); + if (val < 20E9) tempFreq = val; // Range of counter is 20 GHz + } + return tempFreq; + } + } + + public override double Amplitude + { + get { throw new Exception("The method or operation is not implemented."); } + } + } +} diff --git a/DAQ/HP8673BSynth.cs b/DAQ/HP8673BSynth.cs index ab7cd06f..6fee0acf 100644 --- a/DAQ/HP8673BSynth.cs +++ b/DAQ/HP8673BSynth.cs @@ -1,68 +1,68 @@ -using System; - - -using DAQ.Environment; - -namespace DAQ.HAL -{ - /// - /// This class represents a GPIB controlled HP8673B synth. It conforms to the Synth - /// interface. - /// - public class HP8673BSynth : Synth - { - - public HP8673BSynth(String visaAddress) : base(visaAddress) - {} - - override public double Frequency - { - set - { - if (!Environs.Debug) Write("FR" + value + "MZ"); - } - } - - override public double Amplitude - { - set - { - String s = "AP" + value + "DM"; - if (!Environs.Debug) Write(s); - } - } - - override public bool Enabled - { - set - { - if (value) - { - if (!Environs.Debug) Write("RF1"); - } - else - { - if (!Environs.Debug) Write("RF0"); - } - } - } - - public override double DCFM - { - set - { - //TODO - } - } - - public override bool DCFMEnabled - { - set - { - // TODO - } - } - - - } -} +using System; + + +using DAQ.Environment; + +namespace DAQ.HAL +{ + /// + /// This class represents a GPIB controlled HP8673B synth. It conforms to the Synth + /// interface. + /// + public class HP8673BSynth : Synth + { + + public HP8673BSynth(String visaAddress) : base(visaAddress) + {} + + override public double Frequency + { + set + { + if (!Environs.Debug) Write("FR" + value + "MZ"); + } + } + + override public double Amplitude + { + set + { + String s = "AP" + value + "DM"; + if (!Environs.Debug) Write(s); + } + } + + override public bool Enabled + { + set + { + if (value) + { + if (!Environs.Debug) Write("RF1"); + } + else + { + if (!Environs.Debug) Write("RF0"); + } + } + } + + public override double DCFM + { + set + { + //TODO + } + } + + public override bool DCFMEnabled + { + set + { + // TODO + } + } + + + } +} diff --git a/DAQ/HSDIOPatternBuilder.cs b/DAQ/HSDIOPatternBuilder.cs new file mode 100644 index 00000000..6b0018f4 --- /dev/null +++ b/DAQ/HSDIOPatternBuilder.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using DAQ.Environment; +using DAQ.HAL; + +namespace DAQ.Pattern +{ + /// + /// This class builds a sequence of waveforms to be written to a HSDIO card. The advantage of this is that these waveforms can be looped over in a script, which will generally require a lot less onboard memory than defining the pattern for each clock cycle + /// + [Serializable] + public class HSDIOPatternBuilder : PatternBuilder32 + { + // An array of loop times for each waveform + private int[] loopTimes; + + public int[] LoopTimes + { + get { return loopTimes; } + set { loopTimes = value; } + } + private int clockChannel; + public int ClockChannel + { + get { return clockChannel; } + set { clockChannel = value; } + } + + private int clockFreq; + public int ClockFreq + { + get { return clockFreq; } + set { clockFreq = value; } + } + public HSDIOPatternBuilder() + { + //Clear(); + } + + + + /** Generates a pattern by dividing the layout into a sequence of static values for each waveform **/ + public override void BuildPattern(int length) + { + //Used to check if the sequence starts at zero time. + bool zeroStart = true; + + // Check there are events + if (Layout.EventTimes.Count == 0) + throw new PatternBuildException("No events to build patterns for."); + // Check the length is long enough + if (length < Layout.LastEventTime + 1) + throw new PatternBuildException("Pattern will not fit in array of requested length.\n" + + "Pattern length is " + Layout.LastEventTime + ". Array length is " + length); + ArrayList times = Layout.EventTimes; + loopTimes = new int[Layout.EventTimes.Count]; + int numberOfEvents = times.Count; + pattern = new UInt32[numberOfEvents]; + //make the first waveform before the first event + if ((int)times[0] != 0) + { + pattern[0] = 0; + zeroStart = false; + } + + //loop over the events and create a waveform for each + for (int j = 0; j < numberOfEvents;j++) + { + int endTime; + int startTime = (int)times[j]; + if (j!= numberOfEvents-1) + endTime = (int)times[j+1]; + else + endTime = (int)times[j]; + EdgeSet es = Layout.GetEdgeSet(startTime); + UInt32 nextInt; + if (startTime != 0 ) + { + //middle of a pattern - get the last value of each channel + UInt32 previousInt = pattern[j - 1]; + nextInt = GenerateNextInt(previousInt, es, true, startTime); + } + else + { + UInt32 previousInt = 0; + nextInt = GenerateNextInt(previousInt, es, false, startTime); + } + //add this waveform + //if (zeroStart) + //{ + // pattern[j] = nextInt; + // // loopTimes[j] = (endTime - startTime);} + //} + //else + //{ + // pattern[j - 1] = nextInt; + // loopTimes[j - 1] = (endTime - startTime); + //} + pattern[j] = nextInt; + loopTimes[j] = (endTime - startTime); + + + } + + } + + } +} diff --git a/DAQ/HSDIOPatternGenerator.cs b/DAQ/HSDIOPatternGenerator.cs new file mode 100644 index 00000000..60c8297b --- /dev/null +++ b/DAQ/HSDIOPatternGenerator.cs @@ -0,0 +1,219 @@ +using System; +using System.Threading; + +using NationalInstruments.ModularInstruments.Interop; + +using DAQ.Environment; + +namespace DAQ.HAL +{ + /// + /// A class to control the PatternList generator using a HSDIO card. This is designed to operate similarly to the DAQMxPatternGenerator + /// + public class HSDIOPatternGenerator : DAQMxPatternGenerator + { + //The HSDIO cards do not have Task objects. Instead the card is initialised for generation or acquisition and the waveform is written to the card + private niHSDIO hsTask; + private string device; + private double clockFrequency; + private int length; + private bool loop; + public HSDIOPatternGenerator(String device):base(device) + { + this.device = device; + } + + public void Configure(double clockFrequency, bool loop, bool internalClock, bool triggered) + { + this.clockFrequency = clockFrequency; + // this.length = length; + + /**** Configure the output lines ****/ + hsTask = niHSDIO.InitGenerationSession(device, true, true, ""); + + + //configure the card for dynamic generation + hsTask.AssignDynamicChannels("0-31"); + + /**** Configure the clock ****/ + String clockSource = ""; + if (!internalClock) clockSource = (string)Environment.Environs.Hardware.GetInfo("HSClockLine"); + else clockSource = ""; + + + hsTask.ConfigureSampleClock(clockSource, clockFrequency); + if (loop) + { hsTask.ConfigureRefClock(niHSDIOConstants.PxiClkStr, 100000000); } + + if (!triggered) + /**** Configure regeneration ****/ + this.loop = loop; + /**** Configure triggering ****/ + if (triggered) + { + hsTask.ConfigureDigitalEdgeStartTrigger((string)Environs.Hardware.GetInfo("HSTrigger"), niHSDIOConstants.RisingEdge); + } + else + { + //This card will trigger the others and uses the trigger line defined in the hardware class + hsTask.ExportSignal(niHSDIOConstants.StartTrigger, "", (string)Environs.Hardware.GetInfo("HSTrigger")); + //hsTask.ExportSignal(niHSDIOConstants.SampleClock,"",)// + } + /*** Write configuration to board ****/ + hsTask.CommitDynamic(); + } + + + + public void OutputPattern(uint[] pattern, int[] loopTimes) + { + //Check lengths are equal + if (pattern.Length != loopTimes.Length) + throw new Exception("Pattern length not equal to number of loop times"); + //loop over pattern to write the waveforms to the card and build a script string + string script = "script myScript \n"; + string tabStr = "\t"; + //if (loop) { script += "\t repeat forever \n"; tabStr = "\t\t"; } + int width; + uint[] data; + length = pattern.Length; + for (int i = 0; i < loopTimes.Length;i++ ) + { + if (loopTimes[i] % 4 != 0) + { + width = 8; + //data = new uint[width]; + if (loopTimes[i] % 2 == 0) + { + loopTimes[i] = loopTimes[i] / 2; + + } + else + { + throw new Exception("Loop time not a multiple of 4 master clock cycles. Change this to avoid digital pattern timing errors."); + } + } + else + { + width = 4; + //data = new uint[width]; + } + data = new uint[width]; + for (int j = 0; j < width; j++) + { + data[j] = pattern[i]; + } + hsTask.WriteNamedWaveformU32("waveform" + i, width, data); + if (loopTimes[i] == 0) + script += tabStr + " generate waveform" + i + "\n"; + else + script += tabStr+ " Repeat " + loopTimes[i]/4 + "\n "+ tabStr + " generate waveform" + i +"\n" + tabStr + " end repeat \n"; + } + //if (loop) script += "\t end repeat \n"; + script += "end script"; + //Writes the script to the card + hsTask.SetGenerationMode("", niHSDIOConstants.Scripted); + hsTask.WriteScript(script); + + //This assumes the hsdio card triggers the other cards, which is most likely the case + hsTask.ConfigureScriptToGenerate("myScript"); + + + hsTask.Initiate(); + //To avoid timing issues associated with the different pattern generators, I'll add the sleeop one pattern method here + // SleepOnePattern(); + } + + public void BuildScriptForDebug(uint[] pattern, int[] loopTimes) + { + //Check lengths are equal + if (pattern.Length != loopTimes.Length) + throw new Exception("Pattern length not equal to number of loop times"); + //loop over pattern to write the waveforms to the card and build a script string + string script = "script myScript \n"; + int width; + uint[] data; + length = pattern.Length; + for (int i = 0; i < loopTimes.Length; i++) + { + if (loopTimes[i] % 4 != 0) + { + width = 8; + data = new uint[width]; + if (loopTimes[i] % 2 == 0) + { + loopTimes[i] = loopTimes[i] / 2; + + } + else + { + throw new Exception("Loop time not a multiple of 4 master clock cycles. Change this to avoid digital pattern timing errors."); + } + } + else + { + width = 4; + data = new uint[width]; + } + for (int j = 0; j < width; j++) + { + data[j] = pattern[i]; + } + if (loopTimes[i] == 0) + script += "\t generate waveform" + i + "\n"; + else + script += "\t Repeat " + loopTimes[i] / 4 + "\n \t generate waveform" + i + "\n\t end repeat \n"; + } + script += "end script"; + } + private void SleepOnePattern() + { + int sleepTime = (int)(((double)length * 1000) / clockFrequency); + Thread.Sleep(sleepTime); + } + public void StopPattern() + { + //This is a pretty bad way of waiting until the sequence has finished before trying to delete the waveforms + WaitUntilDone(); + hsTask.Dispose(); + } + public void AbortRunning() + { + hsTask.Abort(); + hsTask.reset(); + hsTask.Dispose(); + + } + + public void StartPattern() + { + hsTask.Initiate(); + } + + public void WaitUntilDone() + { + bool done; + int dTime; + try + { + hsTask.IsDone(out done); + } + catch + { + return; + } + if (!done) dTime = hsTask.WaitUntilDone(10000); + else return; + while (dTime != 0) + { + dTime = hsTask.WaitUntilDone(10000); + } + + } + + public void PauseLoop() + { + WaitUntilDone(); + } + } +} diff --git a/DAQ/Hardware.cs b/DAQ/Hardware.cs index 0dbe4bea..d4569169 100644 --- a/DAQ/Hardware.cs +++ b/DAQ/Hardware.cs @@ -77,6 +77,14 @@ public object GetInfo(object key) { return Info[key]; } + //A method to check if a certain info item is contained in the hardware. + public bool ContainsInfo(object value) + { + if (Info.ContainsValue(value)) + return true; + else + return false; + } protected void AddAnalogInputChannel( String name, diff --git a/DAQ/ICEBLOCCommunicator.cs b/DAQ/ICEBLOCCommunicator.cs new file mode 100644 index 00000000..f021c994 --- /dev/null +++ b/DAQ/ICEBLOCCommunicator.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Sockets; +using System.IO; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace DAQ.HAL +{ + /// + /// A base class to communicate with an MSquared ICE-BLOC control module. + /// + public class ICEBLOCCommunicator + { + TcpClient client; + string ipaddress; + int port; + + public ICEBLOCCommunicator(string ipaddress, int port) + { + Configure(ipaddress, port); + this.client = new TcpClient(); + Enable(); + } + public ICEBLOCCommunicator() + { + throw new NotImplementedException(); + } + public void Configure(string ipaddress, int port) + { + this.ipaddress = ipaddress; + this.port = port; + } + + public void Enable() + { + try + { + this.client.Connect(this.ipaddress, this.port); + } + catch (SocketException e) + { + throw new Exception("Could Not Connect to the DCS Module. Check ip address and port number."+e.Message); + } + } + + public void Disable() + { + this.client.Close(); + } + + //TODO Add a method to save settings if needed + public void Save() + { + throw new NotImplementedException(); + } + + public ICEBLOCMessage SendMessage(ICEBLOCMessage message) + { + string json = CreateJsonMessage(message); + string jsonreply = string.Empty; + Byte[] data = System.Text.Encoding.ASCII.GetBytes(json); + NetworkStream stream = this.client.GetStream(); + Byte[] reply = new Byte[1024]; + stream.Write(data, 0, data.Length); + stream.Read(reply, 0, reply.Length); + jsonreply = Encoding.ASCII.GetString(reply, 0, reply.Length); + // Disable(); + + return CreateICEBLOCMessage(jsonreply); + } + + public string CreateJsonMessage(ICEBLOCMessage message) + { + Dictionary messageDict = new Dictionary(); + messageDict["message"] = message; + return JsonConvert.SerializeObject(messageDict,Formatting.None); + + } + + public ICEBLOCMessage CreateICEBLOCMessage(string json) + { + // Dictionary rawMessage = JsonConvert.DeserializeObject(json); + Dictionary rawMessage = JsonConvert.DeserializeObject>(json); + return rawMessage["message"]; + } + } + + [Serializable,JsonObject] + public class ICEBLOCMessage + { + public string op { get; set; } + public string transmission_id { get; set; } + public Dictionary parameters { get; set; } + + public ICEBLOCMessage(string op, string transmission_id,Dictionary parameters) + { + this.op = op; + this.transmission_id = transmission_id; + this.parameters = parameters; + } + /// + /// Checks a reply message to see if it was correctly received + /// + /// + public bool MessageStatus() + { + if (this.parameters.ContainsKey("status")) + { + if ((string)this.parameters["status"] == "ok") + return true; + else + return false; + } + else + return true; + } + + } +} diff --git a/DAQ/ICEBlocDCS.cs b/DAQ/ICEBlocDCS.cs new file mode 100644 index 00000000..fb6ba228 --- /dev/null +++ b/DAQ/ICEBlocDCS.cs @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UtilsNS; + +namespace DAQ.HAL +{ + public class ICEBlocDCS : ICEBlocRemote + { + string my_ip_address = "192.168.1.100"; + byte[] my_byte_ip_address = {192, 168, 1, 100}; + + private static Dictionary _timeBlockNames; + private Dictionary _dcsChannelNames; + + private Dictionary> _timeBlockDict; + + public ICEBlocDCS() + { + M2_ip_address = "192.168.1.237"; + M2_ip_port = 1024; + _timeBlockNames = new Dictionary(); + int stepNo = 1; + foreach (string name in new List(){"Setup", + "Wait", + "State Selection 1", + "Delay", + "State Selection 2", + "Delay", + "Dark 1", + "Pulse 1", + "Dark 2", + "Pulse 2", + "Dark 3", + "Pulse 3", + "Dwell", + "Measure" + }) + { + _timeBlockNames[name] = "time_block_" + stepNo; + stepNo++; + } + + _dcsChannelNames = new Dictionary(); + + _dcsChannelNames["Sequence Trigger"] = "dio_5"; + _dcsChannelNames["X-Axis Running"] = "dio_6"; + _dcsChannelNames["Y-Axis Running"] = "dio_7"; + _dcsChannelNames["Z-Axis Running"] = "dio_8"; + _dcsChannelNames["Chirp Control"] = "dio_9"; + _dcsChannelNames["RF Switch Master"] = "dio_18"; + _dcsChannelNames["RF Switch X"] = "dio_19"; + _dcsChannelNames["RF Switch Y"] = "dio_20"; + _dcsChannelNames["RF Switch Z"] = "dio_21"; + _dcsChannelNames["Phase Shift"] = "ano_8"; + _dcsChannelNames["AOM Master"] = "vga_1"; + _dcsChannelNames["AOM X"] = "vga_2"; + _dcsChannelNames["AOM Y"] = "vga_3"; + _dcsChannelNames["AOM Z"] = "vga_4"; + + _timeBlockDict = new Dictionary>(); + + } + + public int UpdateSequenceParameters(bool report = false) + { + string op = "update_sequence_parameters"; + var prms = _timeBlockDict.ToDictionary(item => item.Key, item => (object) item.Value); + var rslt = GenericCommand(op, prms, report); + //Clears the update dictionary after sending the command + _timeBlockDict.Clear(); + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int) rslt["report"]); + else return ((int) rslt["status"]); + } + + private int FPGARun(string mode, bool report = true) + { + string op = "fpga_run"; + int id; + switch (mode) + { + case "Start": + id = 1; + break; + case "Stop": + id = 0; + break; + case "Load": + id = 2; + break; + default: + throw new Exception("Incorrect mode specified for FPGA run"); + break; + } + Dictionary command = new Dictionary(); + command["mode"] = id; + var rslt = GenericCommand(op, command, report); + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + + #region TimeBlock Dictionary Builders + //private void AddToTimeBlockDict(string timeBlock, + // Dictionary channelDictionary) + //{ + // int id; + // if (_timeBlockNames.Contains(timeBlock)) + // id = _timeBlockNames.IndexOf(timeBlock) + 1; //Time block index starts from 1 + // else throw new Exception("Given timeblock name does not exist in DCS."); + // string timeblockID = "time_block_" + id; + // _timeBlockDict[timeblockID] = channelDictionary; + //} + + //private void AddToChannelDict(string param, object value, ref Dictionary channelDict) + //{ + // if (param == "length" && value is int) channelDict[param] = value; + // else if (param == "multiplier" && value is double) channelDict[param] = value; + // else if (_dcsChannelNames.ContainsKey(param)) channelDict[_dcsChannelNames[param]] = value; + // else + // throw new Exception(string.Format("Parameter {0} not found or Value {1} is not the correct type", param, + // value)); + //} + + private Dictionary CreateSubParameterDict(string channel, object value) + { + + Dictionary stateDict = new Dictionary(); + if (channel == "length" || channel == "multiplier") + { + stateDict[channel] = value; + } + else if (!(_dcsChannelNames.ContainsKey(channel) || _dcsChannelNames[channel].Contains("dio") || + _dcsChannelNames[channel].Contains("vga") || _dcsChannelNames[channel].Contains("ano"))) + throw new Exception(string.Format("Channel {0} not found in DCS channels", channel)); + + else if (value is bool) + { + + Dictionary subParamDict = new Dictionary(); + if ((bool)value) subParamDict["state"] = 1; + else subParamDict["state"] = 0; + stateDict[_dcsChannelNames[channel]] = subParamDict; + } + else + { + double val = Convert.ToDouble(value); + Dictionary subParamDict = new Dictionary(); + if (_dcsChannelNames[channel].Contains("ano") && Utils.InRange(val, 0.0 ,7.0)) + subParamDict["phase"] = val; + else if (_dcsChannelNames[channel].Contains("vga") && Utils.InRange(val,-9.0,22.0)) + subParamDict["amplitude"] = val; + else throw new Exception(string.Format("Value {1} out of range for channel {0}", channel, value)); + + stateDict[_dcsChannelNames[channel]] = subParamDict; + } + + return stateDict; + } + + private Dictionary CreateSubParameterDict(string channel, double amplitude = 0.0, + double frequency = 0.0) + { + Dictionary stateDict = new Dictionary(); + if (channel == "length" || channel == "multiplier") + { + stateDict[channel] = amplitude; + return stateDict; + } + if (!_dcsChannelNames.ContainsKey(channel) || !_dcsChannelNames[channel].Contains("dds")) + throw new Exception(string.Format("Channel {0} not found in DDS DCS channels", channel)); + + if (frequency > 0.0 && (frequency < 1.0 || frequency > 250)) + throw new Exception(string.Format("Frequency for channel {0} is out of 1-250 MHz range", channel)); + if (amplitude > 0.0 && (amplitude < 0.0 || amplitude > 100.0)) + throw new Exception(string.Format("Amplitude for channel {0} is out of 0-100 % range", channel)); + + Dictionary subParamDict = new Dictionary(); + if (frequency > 0.0) subParamDict["frequency"] = frequency; + if (amplitude > 0.0) subParamDict["amplitude"] = amplitude; + + stateDict[_dcsChannelNames[channel]] = subParamDict; + + return stateDict; + } +#endregion + + #region Pulse Helper Functions + /// + /// Configures any of the DDS channels for each Raman pulse + /// + /// X,Y,Z or Master + /// -1 = State Select 1, 0 = State Select 2 or 1,2,3 = Interferometer Pulse + /// time in units of "multiplier" or null if not changing + /// amplitude in dB or null if not changing + /// multipler in units of s or 1e-6 if not changing + /// phase to set in dark time before pulse if pulseNo = 1,2,3 or null if not changing + /// set to true or false to turn on/off + public void ConfigurePulse(string RamanDir, int pulseNo, object length = null, object amplitude = null, + double multiplier = 1e-6, object phase = null, bool state = true) + { + string AOMchannel = "AOM "+RamanDir; + string RFchannel = "RF Switch "+RamanDir; + + //Phase is changed in the step before the pulse + if (phase != null && pulseNo > 0) + { + string darkStep = _timeBlockNames["Dark " + pulseNo]; + + Dictionary phaseDict = CreateSubParameterDict("Phase Shift", phase); + if (!_timeBlockDict.ContainsKey(darkStep)) + { + _timeBlockDict[darkStep] = new Dictionary(); + _timeBlockDict[darkStep].Add(phaseDict.Keys.First(), phaseDict.Values.First()); + } + } + + string pulseStep; + if (pulseNo == -1) + { + pulseStep = _timeBlockNames["State Selection 1"]; + } + else if (pulseNo == 0) + { + pulseStep = _timeBlockNames["State Selection 2"]; + } + else + { + pulseStep = _timeBlockNames["Pulse " + pulseNo]; + } + if (!_timeBlockDict.ContainsKey(pulseStep)) _timeBlockDict[pulseStep] = new Dictionary(); + if (amplitude != null) + { + Dictionary pulseDict = CreateSubParameterDict(AOMchannel, amplitude); + _timeBlockDict[pulseStep].Add(pulseDict.Keys.First(),pulseDict.Values.First()); + } + if (length != null && !_timeBlockDict[pulseStep].ContainsKey("length")) _timeBlockDict[pulseStep].Add("length",Convert.ToInt32(length)); + if (multiplier != null && !_timeBlockDict[pulseStep].ContainsKey("multiplier")) _timeBlockDict[pulseStep].Add("multiplier", (double)multiplier); + + //Sets the channel on/off as well + Dictionary rfDict = CreateSubParameterDict(RFchannel, state); + _timeBlockDict[pulseStep].Add(rfDict.Keys.First(),rfDict.Values.First()); + } + + +#endregion + } + + public class PLLException : Exception { public PLLException(string message) : base(message) { } } + +} diff --git a/DAQ/ICEBlocPLL.cs b/DAQ/ICEBlocPLL.cs new file mode 100644 index 00000000..3eb91543 --- /dev/null +++ b/DAQ/ICEBlocPLL.cs @@ -0,0 +1,338 @@ +using System; +using System.Collections.Generic; +using UtilsNS; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DAQ.HAL +{ + public class ICEBlocPLL : ICEBlocRemote + { + string my_ip_address = "192.168.1.100"; + byte[] my_byte_ip_address = { 192, 168, 1, 100 }; + string M2_ip_address = "192.168.1.228"; // "echo.websocket.org/" + + // Following the manual .... + // 3.1. Tune Resonator + public int tune_resonator(double setting, bool report) + { + Dictionary prms = new Dictionary(); + if (!Utils.InRange(setting, 0, 100)) new Exception("setting - out of range"); + prms.Add("setting", setting); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("tune_resonator", prms, report); + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + + // 3.2. Main Lock + public int main_lock(bool locked, bool report) + { + Dictionary prms = new Dictionary(); + if (locked) prms.Add("operation", "on"); + else prms.Add("operation", "off"); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("main_lock", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + + // 3.3. Main Lock Status + public enum Lock_Status + { + off, // the lock is off + on, // the lock is on + debug, // the lock is in a debug condition + error, // the lock operation is in error + search, // the lock search algorithm is active + low // the lock is off due to low output. + } + + public bool main_lock_status(out Lock_Status mls) + { + Dictionary rslt = GenericCommand("main_lock_status", new Dictionary()); + + mls = (Lock_Status)Enum.Parse(typeof(Lock_Status), (string)rslt["condition"], true); + return (mls == Lock_Status.on); + } + + // 3.4. Aux Lock + public int aux_lock(bool locked, bool report) + { + Dictionary prms = new Dictionary(); + if (locked) prms.Add("operation", "on"); + else prms.Add("operation", "off"); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("aux_lock", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + // 3.5. Aux Lock Status + public bool aux_lock_status(out Lock_Status als) + { + Dictionary rslt = GenericCommand("aux_lock_status", new Dictionary()); + + als = (Lock_Status)Enum.Parse(typeof(Lock_Status), (string)rslt["condition"], true); + return ((int)rslt["status"] == 1); + } + + // 3.6. ECD Lock + public int ecd_lock(bool locked, bool report) + { + Dictionary prms = new Dictionary(); + if (locked) prms.Add("operation", "on"); + else prms.Add("operation", "off"); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("ecd_lock", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + // 3.7. ECD Lock Status + public bool ecd_lock_status(out Lock_Status els) + { + Dictionary rslt = GenericCommand("ecd_lock_status", new Dictionary()); + + els = (Lock_Status)Enum.Parse(typeof(Lock_Status), (string)rslt["condition"], true); + return ((int)rslt["status"] == 1); + } + + // 3.8. Select LO Profile + public int select_lo_profile(int profile, bool report) + { + Dictionary prms = new Dictionary(); + if (!Utils.InRange(profile, 0, 7)) new Exception("profile out of range"); + prms.Add("profile", profile); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("select_lo_profile", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return 2; + if (report) return ((int)rslt["report"]); + else return ((int)rslt["status"]); + } + + // 3.9. Configure LO Profile + public bool configure_lo_profile(bool main_synth, bool aux_synth, string aux_detector_mode, double input_frequency, + double beat_frequency_trim, double chirp_rate, double chirp_duration, bool report) + { + Dictionary prms = new Dictionary(); + if (!(main_synth ^ aux_synth)) throw new Exception("Either main_synth or aux_synth must be enabled"); + if (main_synth) prms.Add("main_synth", "enable"); + else prms.Add("main_synth", "disable"); + if (aux_synth) prms.Add("aux_synth", "enable"); + else prms.Add("aux_synth", "disable"); + prms.Add("aux_detector_mode", aux_detector_mode); + prms.Add("input_frequency", input_frequency); + prms.Add("beat_frequency_trim", beat_frequency_trim); + prms.Add("chirp_rate", chirp_rate); + prms.Add("chirp_duration", chirp_duration); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("configure_lo_profile", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 0); + else return ((int)rslt["status"] == 0); + } + + // 3.10. Configure AOM + public bool configure_aom(bool enable, int freq, bool report) + { + Dictionary prms = new Dictionary(); + if (enable) prms.Add("aom_synth", "enable"); + else prms.Add("aom_synth", "disable"); + prms.Add("frequency", freq); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("configure_aom", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + + public enum MonitorSignal + { + AuxLockOutput = 1, + MainPhaseError = 2, + IFPhaseError = 3, + AuxPhaseError = 4, + EOMOutput = 5, + M3FastOutput = 6, + MainInputPower = 7, + AuxInputPower = 8 + }; + + // 3.11. Apply monitor A + public bool monitor_a(MonitorSignal monitor, bool report) + { + Dictionary prms = new Dictionary(); + prms.Add("signal", (int)monitor); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("monitor_a", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + // 3.12. Apply monitor B + public bool monitor_b(MonitorSignal monitor, bool report) + { + Dictionary prms = new Dictionary(); + prms.Add("signal", (int)monitor); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("monitor_b", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + // 3.13. Frequency reference selection + public bool select_freq_reference(bool external, bool report) + { + Dictionary prms = new Dictionary(); + if (!external) prms.Add("setting", "internal"); + else prms.Add("setting", "external"); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("select_freq_reference", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + // 3.14. Frequency reference trim + public bool trim_freq_reference(double value, bool report) + { + Dictionary prms = new Dictionary(); + prms.Add("setting", value); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("trim_freq_reference", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + // 3.15. Main LO selection + public bool select_main_lo(bool external, bool report) + { + Dictionary prms = new Dictionary(); + if (!external) prms.Add("setting", "internal"); + else prms.Add("setting", "external"); + if (report) prms.Add("report", "finished"); + + Dictionary rslt = GenericCommand("select_main_lo", prms, report); + + if (report) AdjustReport(ref rslt); + if (rslt.Count == 0) return false; + if (report) return ((int)rslt["report"] == 1); + else return ((int)rslt["status"] == 1); + } + // 3.16. System Status + public Dictionary get_status() + { + Dictionary rslt = GenericCommand("get_status", null); + return rslt; + } + + public object CommandTest(int index) + { + object result = null; + Lock_Status mls = new Lock_Status(); + bool success = false; + switch (index) + { + + case 0: + double res_value = 50.0; + result = tune_resonator(res_value, false); + break; + case 1: + result = main_lock(false, true); + break; + case 2: + success = main_lock_status(out mls); + if (success) result = "Main Lock - " + mls.ToString(); + else result = false; + break; + case 3: + result = aux_lock(false, true); + break; + case 4: + success = aux_lock_status(out mls); + if (success) result = "Aux Lock - " + mls.ToString(); + else result = false; + break; + case 5: + result = ecd_lock(false, true); + break; + case 6: + success = ecd_lock_status(out mls); + if (success) result = "Ecd Lock - " + mls.ToString(); + else success = false; + break; + case 7: + result = select_lo_profile(0, true); + break; + case 8: + result = configure_lo_profile(true, false, "ecd", 6834648621.0, 0.0, 500000.0, 0.5, true); + break; + case 9: + result = configure_aom(true, 100000000, true); + break; + case 10: + MonitorSignal mon_a = MonitorSignal.MainInputPower; + result = monitor_a(mon_a, true); + break; + case 11: + MonitorSignal mon_b = MonitorSignal.MainPhaseError; + result = monitor_b(mon_b, true); + break; + case 12: + result = select_freq_reference(false, true); + break; + case 13: + result = trim_freq_reference(1.0, true); + break; + case 14: + result = select_main_lo(false, true); + break; + case 15: + result = get_status(); + break; + default: + result = null; + break; + } + return result; + } + } + + +} diff --git a/DAQ/ICEBlocRemote.cs b/DAQ/ICEBlocRemote.cs new file mode 100644 index 00000000..426a7726 --- /dev/null +++ b/DAQ/ICEBlocRemote.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Net.Sockets; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System.Net; +using UtilsNS; +using System.Collections; + +namespace DAQ.HAL +{ + /// + /// ICEBlocRemote provides wrapper around Phase Lock ICE-BLOCS laser system functionality + /// the websocket communication is supported WebSocketSharp + /// + /// the library is written by Teodor Krastev and it can be used free of charge + /// all copyrights belong to the author and Imperial College, London, UK + /// + public abstract class ICEBlocRemote + { + TcpClient socket; + NetworkStream stream; + bool logFlag = true; + protected string my_ip_address = "192.168.1.100"; + protected byte[] my_byte_ip_address = { 192, 168, 1, 100 }; + protected string M2_ip_address {get; set;} + protected int M2_ip_port { get; set; } + string lastMessage = ""; + int transmission_id = 0; + + protected ICEBlocRemote() + { + M2_ip_address = "192.168.1.228"; + M2_ip_port = 1025; + } + + protected ICEBlocRemote(string ip_address) + { + my_ip_address = ip_address; + my_byte_ip_address = ip_address.Split('.').Cast().ToArray(); + } + + public bool Connected + { + get { return (socket==null)? false : socket.Connected; } + set + { + if (value) + { + if (!Connected) Connect(); + } + else + { + if (Connected) Disconnect(); + } + } + } + + public void Send(string msg) + { + try + { + // Translate the passed message into ASCII and store it as a Byte array. + Byte[] data = System.Text.Encoding.ASCII.GetBytes(msg); + + // Send the message to the connected TcpServer. + stream.Write(data, 0, data.Length); + if (logFlag) Console.WriteLine(">> " + msg); + } + catch (ArgumentNullException e) + { + Console.WriteLine("ArgumentNullException: {0}", e); + } + catch (SocketException e) + { + Console.WriteLine("SocketException: {0}", e); + } + } + + public string Receive() + { + try + { + // Receive the TcpServer.response. + // Buffer to store the response bytes. + Byte[] data = new Byte[256]; + + // Read the first batch of the TcpServer response bytes. + Int32 bytes = stream.Read(data, 0, data.Length); + lastMessage = System.Text.Encoding.ASCII.GetString(data, 0, bytes).Trim(); + if (logFlag) Console.WriteLine("<< " + lastMessage); + return lastMessage; + } + catch (ArgumentNullException e) + { + Console.WriteLine("ArgumentNullException: {0}", e); + return ""; + } + catch (SocketException e) + { + Console.WriteLine("SocketException: {0}", e); + return ""; + } + } + + public void Connect() + { + //Creates a TCPClient using a local end point. + IPAddress ipAddress = new IPAddress(my_byte_ip_address); + //IPAddress[] ipAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList; + IPEndPoint ipLocalEndPoint = new IPEndPoint(ipAddress, 0); + socket = new TcpClient(ipLocalEndPoint); + + //socket = new TcpClient(); + socket.Connect(M2_ip_address, M2_ip_port); + if (socket.Connected) + if (logFlag) Console.WriteLine("Connected to PL IceBloc"); + stream = socket.GetStream(); + } + + public void Disconnect() + { + stream.Close(); + socket.Close(); + if (logFlag) Console.WriteLine("close connection"); + } + + public bool StartLink() + { + Dictionary prmsOut = new Dictionary(); + prmsOut.Add("ip_address", my_ip_address); + Dictionary prmsIn = GenericCommand("start_link", prmsOut); + return (prmsIn.Count > 0); + } + + public bool PingTest() + { + Dictionary prmsOut = new Dictionary(); + prmsOut.Add("text_in", "ABCDEFabcdef"); + Dictionary prmsIn = GenericCommand("ping", prmsOut); + return (prmsIn.Count > 0); + } + + + protected Dictionary GenericCommand(string command, Dictionary prms, bool report) + { + if (!Connected) new Exception("no connection to M2 to be tested"); + transmission_id++; + string msgOut = @"{""message"":{""transmission_id"":[" + transmission_id.ToString(); + + int[] iArr = new int[1]; double[] dArr = new double[1]; + string msg; + if (prms.Count == 0) + { + msg = msgOut + @"],""op"":""" + command + @"""}}"; + } + else + { + Dictionary prmsCopy = ConvertToNumericArrays(prms); + string strPrms = JsonConvert.SerializeObject(prmsCopy); + msg = msgOut + @"],""op"":""" + command + @""",""parameters"":" + strPrms + "}}"; + } + // the point of everything is here + Send(msg); + string msgIn = Receive(); + string msgReport = ""; + if (report) { + while (msgReport == "") + { + msgReport = Receive(); + } + } + + Dictionary rslt = JsonConvert.DeserializeObject>(msgIn); + JObject j0 = (JObject)rslt["message"]; + bool ok = j0.GetValue("op").ToObject().Equals(command + "_reply"); + int[] j = j0.GetValue("transmission_id").ToObject(); + ok = ok && j[0].Equals(transmission_id); + if (!ok) + { + rslt.Clear(); + return rslt; + } + Dictionary final = j0.GetValue("parameters").ToObject>(); + Dictionary finalCopy = new Dictionary(final); + foreach (string key in final.Keys) + { + if (final[key].GetType().Name == "JArray") + { + JArray value = (JArray)final[key]; + if (value.First.GetType() == typeof(Int32)) + { + finalCopy[key] = (int)value.First; + } + else if (value.First.GetType() == typeof(Double)) + { + finalCopy[key] = (double)value.First; + } + else + { + //TODO: Fix this so that it casts the JToken into the expected type. For status codes they should all be integers + JToken v = value.First; + finalCopy[key] = v.ToObject(); + } + + } + if (final[key].GetType().Name == "Int32[]") + { + int[] ia = (int[])final[key]; + finalCopy[key] = ia[0]; + } + if (final[key].GetType().Name == "Double[]") + { + double[] da = (double[])final[key]; + finalCopy[key] = da[0]; + } + } + //There is currently a bug in which the condition value is not returned as a parameter + return finalCopy; + } + protected Dictionary GenericCommand(string command, Dictionary prms) + { + return GenericCommand(command, prms, false); + } + + public void AdjustReport(ref Dictionary report) + { + //This is a temporary fix to add the report value + report["report"] = report["status"]; + } + + protected Dictionary ConvertToNumericArrays(IDictionary prms) + { + Dictionary prmsCopy = new Dictionary(); + foreach (string key in prms.Keys) + { + if (prms[key].GetType().Name == "Int32") + { + // iArr[0] = (int)prms[key]; + prmsCopy[key] = new int[1] {(int)prms[key]}; + continue; + } + + if (prms[key].GetType().Name == "Double") + { + // dArr[0] = (double)prms[key]; + prmsCopy[key] = new double[1] { (double)prms[key] }; + continue; + } + else if (prms[key] is IDictionary) + { + + prmsCopy[key] = ConvertToNumericArrays((IDictionary)prms[key]); + continue; + } + prmsCopy[key] = prms[key]; + + } + return prmsCopy; + } + + } +} diff --git a/DAQ/Layout.cs b/DAQ/Layout.cs index f5a875c9..43acca4f 100644 --- a/DAQ/Layout.cs +++ b/DAQ/Layout.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Text; namespace DAQ.Pattern @@ -51,6 +52,23 @@ public EdgeSet GetEdgeSet( int time ) return (EdgeSet)eventList[time]; } + public Dictionary> GetEdgeDictionary() + { + Dictionary> edgeDict = new Dictionary>(); + foreach (DictionaryEntry ev in eventList) + { + int time = (int)ev.Key; + EdgeSet es = (EdgeSet)ev.Value; + for (int i = 0; i < channels; i++) + { + EdgeSense sense = es.GetEdge(i); + if (sense != EdgeSense.NC && !edgeDict.ContainsKey(i)) edgeDict[i] = new Dictionary(); + if (sense == EdgeSense.UP) edgeDict[i].Add(time, true); + else if (sense == EdgeSense.DOWN) edgeDict[i].Add(time, false); + } + } + return edgeDict; + } public override String ToString() { StringBuilder sb = new StringBuilder(); diff --git a/DAQ/MMAIChannelConfiguration.cs b/DAQ/MMAIChannelConfiguration.cs new file mode 100644 index 00000000..0ba84490 --- /dev/null +++ b/DAQ/MMAIChannelConfiguration.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DAQ.Analog +{ + public class MMAIChannelConfiguration + { + private double AILow; + private double AIHigh; + + public MMAIChannelConfiguration(double aiLow, double aiHigh) + { + AILow = aiLow; + AIHigh = aiHigh; + } + + public Double AIRangeLow + { + get + { + return AILow; + } + set + { + AILow = value; + } + } + + public Double AIRangeHigh + { + get + { + return AIHigh; + } + set + { + AIHigh = value; + } + } + } +} diff --git a/DAQ/MMAIConfiguration.cs b/DAQ/MMAIConfiguration.cs new file mode 100644 index 00000000..0f19854f --- /dev/null +++ b/DAQ/MMAIConfiguration.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using NationalInstruments.DAQmx; +using DAQ.Environment; +using DAQ.HAL; +using Data; +using Data.Scans; +using DAQ.Analog; + +namespace DAQ.Analog +{ + public class MMAIConfiguration + { + public Dictionary AIChannels = new Dictionary(); + private int samplerate; + private int samples; + private double[,] aiData; + + //This class will contain all the required information to configure the timed analog-input tasks when using MOTMaster. + public MMAIConfiguration() + { + + } + + public void AddChannel(string channelName, double aiLow, double aiHigh) + { + MMAIChannelConfiguration AIChanConfig = new MMAIChannelConfiguration(aiLow, aiHigh); + + AIChannels[channelName] = AIChanConfig; + } + + public int SampleRate + { + get + { + return samplerate; + } + set + { + samplerate = value; + } + } + + public int Samples + { + get + { + return samples; + } + set + { + samples = value; + } + } + + public int nChannels + { + get + { + return AIChannels.Count(); + } + } + + public double[,] AIData + { + get + { return aiData; } + + set + { + aiData= value; + } + } + + } +} diff --git a/DAQ/MMAIWrapper.cs b/DAQ/MMAIWrapper.cs new file mode 100644 index 00000000..a08f4ea1 --- /dev/null +++ b/DAQ/MMAIWrapper.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using NationalInstruments.DAQmx; + +using DAQ.Environment; +using DAQ.HAL; +using Data; +using Data.Scans; +using DAQ.Analog; + +namespace DAQ.Analog +{ + public class MMAIWrapper + { + #region ClassAttributes + private Task AITask; + private Task runningTask = null; + private String device; + private AnalogMultiChannelReader AIDataReader; + private int samples; + private int nChannels; + public MMAIConfiguration AIConfig; + private bool asyncRun = false; + #endregion + + public MMAIWrapper(String device) + { + this.device = device; + } + + public void Configure(MMAIConfiguration aiConfig, bool loop = false) + { + //For now lets just deal with adding a single analog input channel. Want things like sample rate to be specified in the mot master sequance. + AIConfig = aiConfig; + samples = aiConfig.Samples; + // asyncRun = loop; + AITask = new Task(this.device.Substring(1) + "AITask"); + + foreach (string keys in aiConfig.AIChannels.Keys) + { + AddToAnalogInputTask(AITask, keys, aiConfig.AIChannels[keys].AIRangeLow,aiConfig.AIChannels[keys].AIRangeHigh); + }; + AIConfig.AIData = new double[AIConfig.AIChannels.Count, samples]; + //For the timiming - for now just derive the ai sample clock from the PCI card, but this isn't synchronised with the PXI Card, so in future will + //need to create a counting task on the AICard and count an exported timiming signal from the PXI or something similar. + + AITask.Timing.ConfigureSampleClock("", aiConfig.SampleRate, SampleClockActiveEdge.Rising, + SampleQuantityMode.FiniteSamples, aiConfig.Samples); + + AITask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( + (string)Environs.Hardware.GetInfo("AIAcquireTrigger"), DigitalEdgeStartTriggerEdge.Rising); + + + AIDataReader = new AnalogMultiChannelReader(AITask.Stream); + AITask.Control(TaskAction.Verify); + AITask.Control(TaskAction.Commit); + + + } + + #region private methods for creating timed Tasks/channels + + private void AddToAnalogInputTask(Task task, string channel, double RangeLow, double RangeHigh) + { + //The configuration settings for the analog input channel live in the RFMOTHardware class + //Need to specify the input range high/low somewhere - perhaps in the scripts would be best. Then MOTMasterScript would have to return + //something like an AIConfigurationObject, which we'd pass to the public Configure() method. + AnalogInputChannel c = ((AnalogInputChannel)Environs.Hardware.AnalogInputChannels[channel]); + c.AddToTask(task, RangeLow, RangeHigh); + } + #endregion + public void StopPattern() + { + AITask.Stop(); + AITask.Dispose(); + } + public void StartTask() + { + if (asyncRun) { runningTask = AITask; AIDataReader.BeginReadMultiSample(AIConfig.Samples, new AsyncCallback(OnAnalogDataReady), null); } + else { /*AITask.Stop();*/ AITask.Start(); } + } + + public void ReadAnalogDataFromBuffer() + { + if (AIDataReader == null) AIDataReader = new AnalogMultiChannelReader(AITask.Stream); + AIConfig.AIData = AIDataReader.ReadMultiSample(samples); + } + + public double[,] GetAnalogData() + { + return AIConfig.AIData; + } + public double[] GetAnalogDataSingleArray() + { + + double[] data = new double[AIConfig.AIData.Length]; + for (int i = 0; i < data.Length; i++) data[i] = AIConfig.AIData[0, i]; + return data; + } + + private void OnAnalogDataReady(IAsyncResult i) + { + if (runningTask != null) + { + AIConfig.AIData = AIDataReader.EndReadMultiSample(i); + AIDataReader.BeginReadMultiSample(AIConfig.Samples, new AsyncCallback(OnAnalogDataReady), null); + AnalogDataReceived.Invoke(this, null); + } + else + { + AIDataReader = null; + } + } + + public void AbortRunning() + { + runningTask = null; + StopPattern(); + AITask = null; + AIDataReader = null; + } + public event EventHandler AnalogDataReceived; + + public void PauseLoop() + { + AITask.WaitUntilDone(); + ReadAnalogDataFromBuffer(); + AITask.Stop(); + } + } +} diff --git a/DAQ/MMConfig.cs b/DAQ/MMConfig.cs index 2902545a..d1254273 100644 --- a/DAQ/MMConfig.cs +++ b/DAQ/MMConfig.cs @@ -1,77 +1,120 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DAQ -{ - public class MMConfig - { - public MMConfig() - { - - } - - public MMConfig(bool camera, bool translation, bool reporter, bool dbg) - { - CameraUsed = camera; - TranslationStageUsed = translation; - ReporterUsed = reporter; - Debug = dbg; - DigitalPatternClockFrequency = 100000; //default value - AnalogPatternClockFrequency = 100000; //default value - ExternalFilePattern = null; - } - - private bool debug; - public bool Debug - { - get { return debug; } - set { debug = value; } - } - - private bool cameraUsed; - public bool CameraUsed - { - get { return cameraUsed; } - set { cameraUsed = value; } - } - - private bool translationStageUsed; - public bool TranslationStageUsed - { - get { return translationStageUsed; } - set { translationStageUsed = value; } - } - - private bool reporterUsed; - public bool ReporterUsed - { - get { return reporterUsed; } - set { reporterUsed = value; } - } - - private int digitalClockFreq; - public int DigitalPatternClockFrequency - { - get { return digitalClockFreq; } - set { digitalClockFreq = value; } - } - - private int analogClockFreq; - public int AnalogPatternClockFrequency - { - get { return analogClockFreq; } - set { analogClockFreq = value; } - } - - private string externalFilePattern; - // Filename pattern for files generated by an external program to be zipped up along with the MOTMaster files, e.g. "*.tif" for image files generated by an external camera control program - public string ExternalFilePattern - { - get { return externalFilePattern; } - set { externalFilePattern = value; } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DAQ +{ + public class MMConfig + { + public MMConfig() + { + + } + + public MMConfig(bool camera, bool translation, bool reporter, bool dbg) + { + CameraUsed = camera; + TranslationStageUsed = translation; + ReporterUsed = reporter; + Debug = dbg; + DigitalPatternClockFrequency = 100000; //default value + AnalogPatternClockFrequency = 100000; //default value + ExternalFilePattern = null; + hsdioCard = false; + useAI = false; + useMuquans = false; + useMMScripts = true; + useMSquared = false; + } + + private bool debug; + public bool Debug + { + get { return debug; } + set { debug = value; } + } + + private bool cameraUsed; + public bool CameraUsed + { + get { return cameraUsed; } + set { cameraUsed = value; } + } + + private bool translationStageUsed; + public bool TranslationStageUsed + { + get { return translationStageUsed; } + set { translationStageUsed = value; } + } + + private bool reporterUsed; + public bool ReporterUsed + { + get { return reporterUsed; } + set { reporterUsed = value; } + } + + private int digitalClockFreq; + public int DigitalPatternClockFrequency + { + get { return digitalClockFreq; } + set { digitalClockFreq = value; } + } + + private int analogClockFreq; + public int AnalogPatternClockFrequency + { + get { return analogClockFreq; } + set { analogClockFreq = value; } + } + + private string externalFilePattern; + // Filename pattern for files generated by an external program to be zipped up along with the MOTMaster files, e.g. "*.tif" for image files generated by an external camera control program + public string ExternalFilePattern + { + get { return externalFilePattern; } + set { externalFilePattern = value; } + } + + private bool hsdioCard; + //Used to flag if an NI-HSDIO card is used to generate digital patterns + public bool HSDIOCard + { + get { return hsdioCard; } + set { hsdioCard = value; } + } + //Used to flag analog inputs + private bool useAI; + public bool UseAI + { + get { return useAI; } + set { useAI = value; } + } + + //Used to flag the use of triggered serial commands + private bool useMuquans; + public bool UseMuquans + { + get { return useMuquans; } + set { useMuquans = value; } + } + + private bool useMSquared; + public bool UseMSquared + { + get {return useMSquared;} + set {useMSquared = value;} + } + //Used to flag the use of motmaster scripts or the UI to generate a sequence + private bool useMMScripts; + public bool UseMMScripts + { + get { return useMMScripts; } + set { useMMScripts = value; } + } + + } +} diff --git a/DAQ/MiniCircuitsUSBFreqCtr.cs b/DAQ/MiniCircuitsUSBFreqCtr.cs new file mode 100644 index 00000000..52d471b4 --- /dev/null +++ b/DAQ/MiniCircuitsUSBFreqCtr.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using mcl_FreqCounter64; +using System.Timers; +namespace DAQ.HAL +{ + public class mcFreqCtr + { + private mcl_FreqCounter64.USB_FreqCounter Counter; + + private float gateTime; + + private Timer CounterTimer; + + private string SN = ""; + + public bool run = false; + + private double freq = 0.0; + + private int status; + + public mcFreqCtr() + { + + } + + public int connectFrqCtr() + { + + Counter = new mcl_FreqCounter64.USB_FreqCounter(); + + status = Counter.Connect(ref(SN)); + + return status; + + } + + public bool isConnected() + { + return status == 1; + } + + public void updateFrequency() + { + status = Counter.ReadFreq(ref(freq)); + } + + public double f + { + get + { + updateFrequency(); + return freq; + } + set + { + freq = value; + } + } + + public float GT + { + get + { + return gateTime; + } + set + { + gateTime = value; + Counter.SetSampleTime(ref(gateTime)); + } + } + + public int getStatus + { + get + { + return status; + } + set + { + + } + } + + } +} \ No newline at end of file diff --git a/DAQ/MuquansBuilder.cs b/DAQ/MuquansBuilder.cs new file mode 100644 index 00000000..59b8c8f8 --- /dev/null +++ b/DAQ/MuquansBuilder.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using DAQ.HAL; + +namespace DAQ.Pattern +{ + //TODO Change this to a more general serial command builder + /// + /// A wrapper class to define a sequence of commands for the Muquans laser. This specifies the laser to control as well as the type of the command - e.g. frequency ramp, change freq/phase + /// + [Serializable] + public class MuquansBuilder + { + public List commands; + //Count the number of times a command is issued for each to check the correct number of triggers are sent + public int slaveTrigCount; + public int aomTrigCount; + public int ramanTrigCount; + + public MuquansBuilder() + { + commands = new List(); + slaveTrigCount = 0; + aomTrigCount = 0; + ramanTrigCount = 0; + } + + public void SetFrequency(string laser, double frequency) + { + commands.Add(new MuquansCommand(laser, frequency, Instruction.set)); + AddToCount(laser); + } + public void SweepFrequency(string laser, double frequency, double time) + { + commands.Add(new MuquansCommand(laser, frequency, Instruction.sweep, time)); + AddToCount(laser); + } + + public void AddToCount(string laser) + { + if (laser == "mphi") + aomTrigCount += 1; + else if (laser == "raman") + ramanTrigCount += 1; + else + slaveTrigCount += 1; + + } + + public void AddCommand(string id, string message) + { + if (id == "slave0" || id == "mphi") { commands.Add(new MuquansCommand(id, message)); AddToCount(id); } + else throw new ArgumentException(); + } + } +} diff --git a/DAQ/MuquansController.cs b/DAQ/MuquansController.cs new file mode 100644 index 00000000..d839be75 --- /dev/null +++ b/DAQ/MuquansController.cs @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Diagnostics; +using System.Windows.Forms; +using NationalInstruments.DAQmx; +using System.Threading; + +using DAQ.Environment; +using NationalInstruments.VisaNS; + +namespace DAQ.HAL +{ + [Serializable] + public class MuquansRS232 : RS232Instrument + { + string id; + + + public MuquansRS232(string visaAddress, string id) : base(visaAddress) + { + this.id = id; + this.baudrate = 230400; + + } + public override void Connect() + { + Connect(SerialTerminationMethod.TerminationCharacter); + } + public void Output(string message) + { + try + { + this.serial.Write(message); + this.serial.Flush(NationalInstruments.VisaNS.BufferTypes.OutBuffer, false); + + + } + catch { throw new Exception("Error writing serial command: "+message); } + } + + + + } + /// + /// An interface to control the muquans laser using serial communication to onboard DDS. These are used to program the frequency/phase of each laser + /// + public class MuquansController :MarshalByRefObject + { + public MuquansRS232 slaveComm; + public MuquansRS232 aomComm; + private Process slaveDDS; + private Process aomDDS; + private Task counterTask; + private Task runningTask; + private List slaveCommands; + private List aomCommands; + private int counts; + private Stopwatch stopwatch; + int serialCounter = 0; + + + + + public MuquansController() + { + slaveComm = (MuquansRS232)Environs.Hardware.Instruments["muquansSlave"]; + aomComm = (MuquansRS232)Environs.Hardware.Instruments["muquansAOM"]; + + //slaveDDS = new Process(); + //string path = (string)Environs.FileSystem.Paths["MuquansExePath"]; + //slaveDDS.StartInfo = ConfigureDDS(path, "slaves", 19); + //slaveDDS.Start(); + //aomDDS = new Process(); + //aomDDS.StartInfo = ConfigureDDS(path, "aom", 21); + //aomDDS.Start(); + slaveCommands = new List(); + aomCommands = new List(); + + } + public ProcessStartInfo ConfigureDDS(string path,string id, int port) + { + /// + ///Configures the starting parameters for a dds process + ///id - The identifier for the DDS. This is either "slave" or "aom" + ///port - The port number used to communicate to the DDS. The default values are 18 and 20 + /// + + ProcessStartInfo info = new ProcessStartInfo(); + info.Arguments = path + "ukus_dds_" + id + "_conf.txt comm " + port; + info.FileName = path + "serial_to_dds_gw.exe"; + info.WindowStyle = ProcessWindowStyle.Hidden; + info.UseShellExecute = false; + info.RedirectStandardError = true; + info.RedirectStandardOutput = true; + info.ErrorDialog = true; + return info; + + } + #region Command Building + public string BuildLaserString(string laser, string command) + { + string msg; + if (laser == "mphi") + msg = command + " mphi "; + else + { + if (laser == "raman") + msg = "set_dds dds_raman; " + command + " "; + else + msg = "set_dds ddsq; " + command + " " + laser + " "; + } + return msg; + } + + public string SetFrequency(string laser, double val) + { + string msg = BuildLaserString(laser, "set_freq"); + msg += val + "e6; ext_update\n"; + return msg; + } + + public string SetPhase(string laser, double val) + { + string msg = BuildLaserString(laser, "set_phase"); + msg += val + "; ext_update\n"; + return msg; + } + //Sweeps the frequency of a laser. The frequency value is a DDS frequency in MHz and the time is in ms. + public string SweepFrequency(string laser, double freqTo, double time) + { + string msg = BuildLaserString(laser, "sweep_to"); + msg += freqTo + "e6 " + time + "e-3; ext_update\n"; + return msg; + } + + public void SetMOTFrequency(double freq) + { + //ddsVal = 88.8125 - 0.0625 * freq; + slaveCommands.Add(SetFrequency("slave0", freq)); + } + public void SetMPhiFrequency(double freq) + { + //double ddsVal = 107.975 + 0.25 * freq; + aomCommands.Add(SetFrequency("mphi", freq)); + } + + public void SweepMOTFrequency(double freq, double time) + { + //double ddsVal = 88.8125 - 0.0625 * freq; + slaveCommands.Add(SweepFrequency("slave0", freq, time)); + } + + public void SweepMphiFrequency(double freq, double time) + { + //double ddsVal = 107.975 + 0.25 * freq; + aomCommands.Add(SweepFrequency("mphi", freq, time)); + } + #endregion + /// + /// Configures the counter task on a specified counter channel. The sample clock for this task is the PFI channel used to trigger serial communication + /// + public void Configure(bool loop) + { + + counterTask = new Task(); + + CounterChannel counter = (CounterChannel) Environs.Hardware.CounterChannels["Counter"]; + counterTask.CIChannels.CreateCountEdgesChannel(counter.PhysicalChannel, counter.Name, CICountEdgesActiveEdge.Rising, 0, CICountEdgesCountDirection.Up); + counterTask.CIChannels[0].CountEdgesTerminal = (string)Environs.Hardware.Boards["analogOut"] + "/pfi1"; + + counterTask.SampleClock += new SampleClockEventHandler(counterTask_Sample); + + counterTask.Timing.ConfigureSampleClock((string)Environs.Hardware.Boards["analogOut"] + "/pfi1", 100000, SampleClockActiveEdge.Rising, SampleQuantityMode.HardwareTimedSinglePoint); + + counterTask.Control(TaskAction.Verify); + + } + + + void counterTask_Sample(object sender, SampleClockEventArgs e) + { + lock (slaveCommands) + { + if (serialCounter < slaveCommands.Count) slaveComm.Output(slaveCommands[serialCounter]); + if (serialCounter < aomCommands.Count) aomComm.Output(aomCommands[serialCounter]); + serialCounter++; + if (serialCounter == slaveCommands.Count) serialCounter = 0; //Reset to allow for loop mode + Console.WriteLine(string.Format("wrote command {0} at {1}", serialCounter - 1, + stopwatch.ElapsedMilliseconds)); + } + } + + /// + /// Builds the string messages used for each command to the Muquans laser. These are added to a list of each DDS + /// + /// + public void BuildCommands(List commands) + { + foreach (MuquansCommand command in commands) + { + if (command.rawMessage != null) + { + if (command.laser == "mphi") aomCommands.Add(command.rawMessage); + else if (command.laser == "slave0") slaveCommands.Add(command.rawMessage); + else throw new ArgumentException(); + continue; + } + if (command.instruction == Instruction.set) + { + if (command.laser == "mphi") + SetMPhiFrequency(command.frequency); + else if (command.laser == "raman") + throw new NotImplementedException(); + else + SetMOTFrequency(command.frequency); + } + else if (command.instruction == Instruction.sweep) + { + if (command.laser == "mphi") + SweepMphiFrequency(command.frequency, command.sweeptime); + else if (command.laser == "raman") + throw new NotImplementedException(); + else + SweepMOTFrequency(command.frequency, command.sweeptime); + } + else + throw new NotImplementedException(); + } + } + public void StartOutput() + { + + stopwatch = new Stopwatch(); + serialCounter = 0; + slaveComm.Connect(); + aomComm.Connect(); + ////Outputs the first commands then waits 10ms before returning + //aomComm.Output(aomCommands[serialCounter]); + //slaveComm.Output(slaveCommands[serialCounter]); + //serialCounter++; + Thread.Sleep(10); + stopwatch.Start(); + + counterTask.Start(); + + } + + public void StopOutput() + { + counterTask.Dispose(); + slaveComm.Disconnect(); + aomComm.Disconnect(); + slaveCommands = new List(); + aomCommands = new List(); + stopwatch.Stop(); + } + + + } + public enum Instruction: byte {sweep,set,phase}; + public struct MuquansCommand + { + public string laser; + public double frequency; + public double sweeptime; + public Instruction instruction; + public string rawMessage; + + public MuquansCommand(string laser,double frequency, Instruction type, double time) + { + this.laser = laser; + this.frequency = frequency; + this.sweeptime = time; + this.instruction = type; + this.rawMessage = null; + + } + public MuquansCommand(string laser,double frequency, Instruction type) + { + this.laser = laser; + this.frequency = frequency; + this.sweeptime = 0.0; + this.instruction = type; + this.rawMessage = null; + } + public MuquansCommand(string laser,string rawMessage) + { + this.laser = laser; + this.frequency = 0.0; + this.sweeptime = 0.0; + this.instruction = Instruction.set; + this.rawMessage = rawMessage; + } + } + +} diff --git a/DAQ/NavigatorFileSystem.cs b/DAQ/NavigatorFileSystem.cs new file mode 100644 index 00000000..58eae2e2 --- /dev/null +++ b/DAQ/NavigatorFileSystem.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; + +namespace DAQ.Environment +{ + public class NavigatorFileSystem : DAQ.Environment.FileSystem + { + public NavigatorFileSystem() + { + string user = System.Environment.ExpandEnvironmentVariables("%USERPROFILE%"); + string relativePath = AppDomain.CurrentDomain.BaseDirectory; + string basePath = Directory.GetParent(Directory.GetParent(System.Windows.Forms.Application.ExecutablePath).Parent.FullName).FullName; + string configPath = basePath + "\\Config\\"; + Paths.Add("configPath", configPath); + + string baseDataPath = basePath + "\\Data\\"; + Paths.Add("baseDataPath", baseDataPath); + + Paths.Add("mathPath", "C:\\Program Files\\Wolfram Research\\Mathematica\\10.4\\mathkernel.exe"); + Paths.Add("scriptListPath", basePath + "\\Scripts"); + Paths.Add("MOTMasterEXEPath", relativePath); + + Paths.Add("cameraAttributesPath", configPath + "cam0.icd"); + Paths.Add("CameraAttributesPath", configPath + "cam0_remote.icd"); + Paths.Add("daqDLLPath", relativePath + "DAQ.dll"); + + string sYear = DateTime.Today.Year.ToString(); + string sMonth = DateTime.Today.Month.ToString().PadLeft(2, '0'); + string sDay = DateTime.Today.Day.ToString().PadLeft(2, '0'); + Paths.Add("DataPath", baseDataPath + sYear + "\\" + sMonth + "\\" + sDay); + + Paths.Add("settingsPath", user + "\\Settings"); + if (!Directory.Exists((string)Paths["DataPath"])) + { + Directory.CreateDirectory((string)Paths["DataPath"]); + } + Paths.Add("MuquansExePath", configPath + "ukus_dds_comm_gw\\"); + Paths.Add("HardwareClassPath", Directory.GetParent(basePath).FullName + "\\DAQ\\NavigatorHardware.cs"); + } + } +} diff --git a/DAQ/NavigatorHardware.cs b/DAQ/NavigatorHardware.cs new file mode 100644 index 00000000..020b8f80 --- /dev/null +++ b/DAQ/NavigatorHardware.cs @@ -0,0 +1,135 @@ +using System; +using System.Linq; +using System.Collections.Generic; + +using NationalInstruments.DAQmx; + +using DAQ.Pattern; + +namespace DAQ.HAL +{ + /// + /// This is the specific hardware for the Navigator experiment. Currently, the channels used must be specified here. At a later date, the physical channels may be defined inside a settings file for the hardware controller. + /// + public class NavigatorHardware : DAQ.HAL.Hardware + { + public MMConfig config { get; set; } + public NavigatorHardware() + { + + //add information for MMConfig + config = new MMConfig(false, false, false,Environment.Environs.Debug); + config.HSDIOCard = true; + config.UseAI = true; + config.DigitalPatternClockFrequency = 20000000; + config.UseMuquans = true; + config.UseMMScripts = false; + config.UseMSquared = true; + Info.Add("MotMasterConfiguration", config); + //add the boards - perhaps these values can be derived from a settings file + Boards.Add("multiDAQ", "/Dev1"); + Boards.Add("analogOut", "/Dev2"); + //The HSDIO card cannot be referenced with a leading forward slash like DAQ cards + Boards.Add("hsDigital", "Dev3"); + Boards.Add("analogIn", "/Dev4"); + string multiBoard = (string)Boards["multiDAQ"]; + string aoBoard = (string)Boards["analogOut"]; + string hsdioBoard = (string)Boards["hsDigital"]; + string aiBoard = (string)Boards["analogIn"]; + //Collect each type of board into a list - this is useful if we need to loop over each + List aoBoards = new List(); + List aiBoards = new List(); + List doBoards = new List(); + aoBoards.Add(multiBoard); + aiBoards.Add(aiBoard); + aiBoards.Add(multiBoard); + doBoards.Add(hsdioBoard); + + + //A list of trigger lines for each card + Info.Add("sampleClockLine", (string)Boards["hsDigital"] + "/PXI_Trig0"); + Info.Add("analogInTrigger0", (string)Boards["multiDAQ"] + "/PXI_Trig1"); + Info.Add("AOPatternTrigger", (string)Boards["analogOut"] + "/PXI_Trig1"); + //Info.Add("analogInClock", (string)Boards["analogOut"] + "/ao/SampleClock"); + Info.Add("analogInTrigger1", (string)Boards["multiDAQ"] + "/PXI_Trig2"); + Info.Add("HSTrigger", "PXI_Trig1"); + + //Add identifiers for each card + + Info.Add("analogOutBoards", aoBoards); + Info.Add("analogInBoards", aiBoards); + Info.Add("digitalBoards", doBoards); + Info.Add("AIAcquireTrigger", "pfi0"); + //Add other instruments such as serial channels + Instruments.Add("muquansSlave", new MuquansRS232("ASRL18::INSTR","slave")); + Instruments.Add("muquansAOM", new MuquansRS232("ASRL20::INSTR","aom")); + Instruments.Add("microwaveSynth", new WindfreakSynth("ASRL13::INSTR")); + + Instruments.Add("MSquaredDCS", new ICEBlocDCS()); + Instruments.Add("MSquaredPLL", new ICEBlocPLL()); + //Instruments.Add("microwaveSynth", new Gigatronics7100Synth("GPIB1::19::INSTR")); + + + //map the digital channels + + AddDigitalOutputChannel("motTTL", hsdioBoard, 0, 0); + AddDigitalOutputChannel("ramanTTL", hsdioBoard, 0, 1); + AddDigitalOutputChannel("mphiTTL", hsdioBoard, 0, 2); + AddDigitalOutputChannel("slaveDDSTrig", hsdioBoard, 0, 3); + AddDigitalOutputChannel("ramanDDSTrig", hsdioBoard, 0, 4); + AddDigitalOutputChannel("aomDDSTrig", hsdioBoard, 0, 5); + AddDigitalOutputChannel("shutter", hsdioBoard, 0, 6); + AddDigitalOutputChannel("xaomTTL", hsdioBoard, 0, 7); + AddDigitalOutputChannel("yaomTTL", hsdioBoard, 0, 8); + AddDigitalOutputChannel("zpaomTTL", hsdioBoard, 0, 9); + AddDigitalOutputChannel("zmaomTTL", hsdioBoard, 0, 10); + AddDigitalOutputChannel("2DaomTTL", hsdioBoard, 0, 11); + AddDigitalOutputChannel("pushaomTTL", hsdioBoard, 0, 12); + AddDigitalOutputChannel("cameraTTL", hsdioBoard, 0, 13); + AddDigitalOutputChannel("acquisitionTrigger", hsdioBoard, 0, 14); + AddDigitalOutputChannel("Digital Test", hsdioBoard, 0, 15); + AddDigitalOutputChannel("Analog Trigger", hsdioBoard, 0, 16); + AddDigitalOutputChannel("serialPreTrigger", hsdioBoard, 0, 31); + + //map the analog output channels + AddAnalogOutputChannel("motCTRL", aoBoard + "/ao0", -10, 10); + AddAnalogOutputChannel("ramanCTRL", aoBoard + "/ao1", -10, 10); + AddAnalogOutputChannel("mphiCTRL", aoBoard + "/ao2", -10, 10); + AddAnalogOutputChannel("mot3DCoil", aoBoard + "/ao9", -10, 10); + AddAnalogOutputChannel("mot2DCoil", aoBoard + "/ao11", -10, 10); + AddAnalogOutputChannel("xbiasCoil", aoBoard + "/ao6", -10, 10); + AddAnalogOutputChannel("ybiasCoil", aoBoard + "/ao7", -10, 10); + AddAnalogOutputChannel("zbiasCoil", aoBoard + "/ao5", -10, 10); + AddAnalogOutputChannel("xbias2DCoil", aoBoard + "/ao3", -10, 10); + AddAnalogOutputChannel("ybias2DCoil", aoBoard + "/ao4", -10, 10); + AddAnalogOutputChannel("vertPiezo", aoBoard + "/ao10", 0, 10); + AddAnalogOutputChannel("horizPiezo", aoBoard + "/ao24", -10, 10); + AddAnalogOutputChannel("xaomFreq", aoBoard + "/ao12", -10, 10); + AddAnalogOutputChannel("yaomFreq", aoBoard + "/ao13", -10, 10); + AddAnalogOutputChannel("zpaomFreq", aoBoard + "/ao14", -10, 10); + AddAnalogOutputChannel("zmaomFreq", aoBoard + "/ao15", -10, 10); + AddAnalogOutputChannel("2DaomFreq", aoBoard + "/ao16", -10, 10); + AddAnalogOutputChannel("pushaomFreq", aoBoard + "/ao17", -10, 10); + AddAnalogOutputChannel("xaomAtten", aoBoard + "/ao18", -10, 10); + AddAnalogOutputChannel("yaomAtten", aoBoard + "/ao19", -10, 10); + AddAnalogOutputChannel("zpaomAtten", aoBoard + "/ao20", -10, 10); + AddAnalogOutputChannel("zmaomAtten", aoBoard + "/ao21", -10, 10); + AddAnalogOutputChannel("2DaomAtten", aoBoard + "/ao22", -10, 10); + AddAnalogOutputChannel("pushaomAtten", aoBoard + "/ao23", -10, 10); + // AddAnalogOutputChannel("analogTest", aoBoard + "/ao24", -10, 10); + + //map the analog input channels + AddAnalogInputChannel("accelerometer", aiBoard + "/ai0", AITerminalConfiguration.Differential); + AddAnalogInputChannel("photodiode", aiBoard + "/ai1", AITerminalConfiguration.Differential); + AddAnalogInputChannel("fibrePD", aiBoard + "/ai3", AITerminalConfiguration.Differential); + AddAnalogInputChannel("forwardRamanPD", multiBoard + "/ai0", AITerminalConfiguration.Differential); + AddAnalogInputChannel("backwardRamanPD", multiBoard + "/ai1", AITerminalConfiguration.Differential); + AddAnalogInputChannel("motPD", multiBoard + "/ai2", AITerminalConfiguration.Differential); + AddAnalogInputChannel("slave0Error", multiBoard + "/ai3", AITerminalConfiguration.Differential); + AddAnalogInputChannel("slave1Error", multiBoard + "/ai4", AITerminalConfiguration.Differential); + AddAnalogInputChannel("slave2Error", multiBoard + "/ai5", AITerminalConfiguration.Differential); + + AddCounterChannel("Counter", multiBoard + "/ctr0"); + } + } +} diff --git a/DAQ/NovatechSerialPort.cs b/DAQ/NovatechSerialPort.cs new file mode 100644 index 00000000..43ca15cc --- /dev/null +++ b/DAQ/NovatechSerialPort.cs @@ -0,0 +1,139 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.IO.Ports; +using DAQ.Environment; + +namespace DAQ.HAL +{ + public class NovatechSerialPort + { + public class ddsChannel + { + private double channelFreq; + private string channelName; + public ddsChannel(string name) + { + this.channelName = name; + this.channelFreq = (double)1; + } + public double Freq + { + get { return channelFreq; } + set { channelFreq = value; } + } + public string Name + { + get { return channelName; } + set { channelName = Name; } + } + } + // A class containing methods to write the commands listed in the Novatech API to the serial port. + + public SerialPort novatechSerialPort = new SerialPort(); + private int counter; + private System.Timers.Timer serialTimer; + private Dictionary channels; + private Dictionary serialCommands; + public Dictionary errorMessages; + public NovatechSerialPort() + { + channels = new Dictionary(); + channels["ddsCh1"] = new ddsChannel("F0"); + channels["ddsCh2"] = new ddsChannel("F1"); + channels["ddsCh3"] = new ddsChannel("F2"); + channels["ddsCh4"] = new ddsChannel("F3"); + + serialCommands = new Dictionary(); + + errorMessages = new Dictionary(); + errorMessages["OK"] = "Good command received"; + errorMessages["?0"] = "Unrecognized command"; + errorMessages["?1"] = "Bad frequency"; + errorMessages["?2"] = "Bad AM command"; + errorMessages["?3"] = "Input line too long"; + errorMessages["?4"] = "Bad Phase"; + errorMessages["?5"] = "Bad time"; + errorMessages["?6"] = "Bad Mode"; + errorMessages["?7"] = "Bad amp"; + errorMessages["?8"] = "Bad constant"; + errorMessages["?f"] = "Bad byte"; + + + } + public void openNovatechPort(string portName, Int32 baudRate) + { + novatechSerialPort.PortName = portName; + novatechSerialPort.BaudRate = 19200; + novatechSerialPort.Open(); + + } + + public void writeSerialCommandToBuffer(string serialCommand) + { + novatechSerialPort.WriteLine(serialCommand); + } + + public void closeNovatechPort() + { + novatechSerialPort.Close(); + } + + public void updateChannelFrequenciesDictionary(Dictionary newFrequencies) + { + foreach (var key in newFrequencies.Keys) + { + var value = newFrequencies[key]; + if (channels[key].Freq != value) + { + channels[key].Freq = value; + } + } + writeFreqenciesdictionaryToBuffer(); + } + + private void writeFreqenciesdictionaryToBuffer() + { + serialTimer = new System.Timers.Timer(); + serialTimer.Interval = 100; + serialTimer.AutoReset = true; + serialTimer.Elapsed += onElapsedEvent; + serialTimer.Enabled = true; + counter = 0; + + } + private void onElapsedEvent(Object source, System.Timers.ElapsedEventArgs e) + { + writeOneChannel(); + } + + private void writeOneChannel() + { + if (counter == channels.Count()) + { + counter = 0; + serialTimer.Dispose(); + } + else + { + var key = channels.ElementAt(counter).Key; + ddsChannel channel = channels[key]; + //novatechSerialPort.Write(channel.Name + " "); + //byte[] freqByte = BitConverter.GetBytes(channel.Freq); + //novatechSerialPort.Write(freqByte, 0, 0); + novatechSerialPort.WriteLine(channel.Name + " " + channel.Freq.ToString()); + counter++; + } + } + // private void castTo + + public Dictionary getFrequenciesDictionary() + { + return channels; + } + } +} \ No newline at end of file diff --git a/DAQ/PXISympatheticHardware.cs b/DAQ/PXISympatheticHardware.cs index afdad988..2b72a493 100644 --- a/DAQ/PXISympatheticHardware.cs +++ b/DAQ/PXISympatheticHardware.cs @@ -1,128 +1,128 @@ -using System; -using System.Collections; - -using NationalInstruments.DAQmx; - -using DAQ.Pattern; - -namespace DAQ.HAL -{ - /// - /// This is the specific hardware that the edm machine has. This class conforms - /// to the Hardware interface. - /// - public class PXISympatheticHardware : DAQ.HAL.Hardware - { - - public PXISympatheticHardware() - { - - // add the boards - Boards.Add("multiDAQ", "/PXI1Slot6"); - Boards.Add("aoBoard", "/PXI1Slot5"); - Boards.Add("usbDAQ", "/Dev1"); - - - string multiDAQ = (string)Boards["multiDAQ"]; - string aoBoard = (string)Boards["aoBoard"]; - string usbDAQ = (string)Boards["usbDAQ"]; - - // add things to the info - Info.Add("PGClockLine", multiDAQ + "/PFI14"); - Info.Add("PatternGeneratorBoard", multiDAQ); - Info.Add("PGClockCounter", "/ctr0"); - Info.Add("APGClockCounter", aoBoard + "/ctr0"); - Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); - Info.Add("MOTMasterDigitalPatternClockFrequency", 10000); - Info.Add("MOTMasterAnalogPatternClockFrequency", 10000); - - Info.Add("Element", "Li"); - //Test this - //Info.Add("PGType", "dedicated"); - Info.Add("PGType", "integrated"); - - - // map the digital output channels - // Control of atoms - AddDigitalOutputChannel("MOTMasterPatternTrigger", multiDAQ, 0, 0); - - AddDigitalOutputChannel("aom0enable", multiDAQ, 0, 0); - AddDigitalOutputChannel("aom1enable", multiDAQ, 0, 1); - AddDigitalOutputChannel("aom2enable", multiDAQ, 0, 2); - AddDigitalOutputChannel("aom3enable", multiDAQ, 0, 3); - - - AddDigitalOutputChannel("CameraTrigger", multiDAQ, 0, 4); - AddDigitalOutputChannel("AnalogPatternTrigger", multiDAQ, 0, 5); - AddDigitalOutputChannel("TranslationStageTrigger", multiDAQ, 0, 6); - AddDigitalOutputChannel("shutterenable", multiDAQ, 1, 1); - - /* - //Control of molecules - AddDigitalOutputChannel("valve", multiDAQ, 0, 0); - AddDigitalOutputChannel("valve2", multiDAQ, 0, 1); - AddDigitalOutputChannel("q", multiDAQ, 0, 2); - AddDigitalOutputChannel("discharge", multiDAQ, 0, 3); - AddDigitalOutputChannel("aom", multiDAQ, 0, 4); - AddDigitalOutputChannel("flash2", multiDAQ, 0, 5); - AddDigitalOutputChannel("q2", multiDAQ, 0, 6); - AddDigitalOutputChannel("detector", multiDAQ, 0, 7); - AddDigitalOutputChannel("detectorprime", multiDAQ, 0, 8); - AddDigitalOutputChannel("flash", multiDAQ, 0, 9); - */ - - - - // map the analog input channels - AddAnalogInputChannel("pmt", multiDAQ + "/ai0", AITerminalConfiguration.Rse); //Pin 68 - AddAnalogInputChannel("lockcavity", multiDAQ + "/ai1", AITerminalConfiguration.Rse); //Pin 33 - AddAnalogInputChannel("probepower", multiDAQ + "/ai9", AITerminalConfiguration.Rse); //Pin 66 - - AddAnalogInputChannel("laserLockErrorSignal", multiDAQ + "/ai2", AITerminalConfiguration.Rse); - AddAnalogInputChannel("chamber1Pressure", usbDAQ + "/ai0", AITerminalConfiguration.Differential); - AddAnalogInputChannel("chamber2Pressure", usbDAQ + "/ai1", AITerminalConfiguration.Differential); - // map the analog output channels - // Control of atoms - AddAnalogOutputChannel("aom0amplitude", aoBoard + "/ao16"); - AddAnalogOutputChannel("aom0frequency", aoBoard + "/ao9"); - AddAnalogOutputChannel("aom1amplitude", aoBoard + "/ao10"); - AddAnalogOutputChannel("aom1frequency", aoBoard + "/ao11"); - AddAnalogOutputChannel("aom2amplitude", aoBoard + "/ao12"); - AddAnalogOutputChannel("aom2frequency", aoBoard + "/ao13"); - AddAnalogOutputChannel("aom3amplitude", aoBoard + "/ao14"); - AddAnalogOutputChannel("aom3frequency", aoBoard + "/ao15"); - AddAnalogOutputChannel("coil0current", aoBoard + "/ao8"); - AddAnalogOutputChannel("coil1current", aoBoard + "/ao17"); - AddAnalogOutputChannel("laser", aoBoard + "/ao1"); - AddAnalogOutputChannel("cavity", multiDAQ + "/ao1"); - - - //Control of molecules - //AddAnalogOutputChannel("laser", aoBoard + "/ao0"); // Pin 22 - //AddAnalogOutputChannel("highvoltage", aoBoard + "/ao1"); // Note - this is just here because a channel called "highvoltage" has been hard-wired into DecelerationHardwareControl - this needs to be rectified - //AddAnalogOutputChannel("cavity", aoBoard + "/ao1"); // Pin 21 - - // map the counter channels - AddCounterChannel("pmt", multiDAQ + "/ctr0"); //Source is pin 37, gate is pin 3, out is pin 2 - AddCounterChannel("sample clock", multiDAQ + "/ctr1"); //Source is pin 42, gate is pin 41, out is pin 40 - - // Calibrations - AddCalibration("chamber1Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); - AddCalibration("chamber2Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); - //AddCalibration("aom3frequency", new PolynomialCalibration - //(new double[] {-27.2757, 0.698297, -0.0075598, 0.000045057, -1.33872 * Math.Pow(10,-7), 1.57402* Math.Pow(10, -10)})); - AddCalibration("aom0frequency", new PolynomialCalibration(new double[] - {9.73471, -0.389447, 0.00439124, -0.0000200009, 4.27697*Math.Pow(10,-8), -3.44365*Math.Pow(10,-11)}, 130, 260)); - AddCalibration("aom1frequency", new PolynomialCalibration(new double[] - {-11.9562, 0.185676, -0.00161757, 0.0000109047, -3.54351*Math.Pow(10,-8), 4.35218*Math.Pow(10,-11)}, 130, 260)); - AddCalibration("aom2frequency", new PolynomialCalibration(new double[] - { 0.471968, -0.139565, 0.00173958, -6.18839 * Math.Pow(10, -6), 7.4987 * Math.Pow(10, -9), 8.99272 * Math.Pow(10, -13) }, 130,260)); - AddCalibration("aom3frequency", new PolynomialCalibration(new double[] - {0.879515, -0.143097, 0.00170292, -5.6672*Math.Pow(10,-6), 5.44491*Math.Pow(10,-9), 3.56736*Math.Pow(10,-12)},130,260)); - //AddCalibration("coil0current", new LinearInterpolationCalibration(new double[,] {{0.0, 0.0}, {0.0, 0.5}, {0.23, 0.75}, {0.82, 1}, {1.44, 1.25}, - //{2.1, 1.5}, {2.75, 1.75}, {3.41, 2}, {4.73, 2.5}, {6.08, 3}, {7.4, 3.5}, {8.76, 4}, {10.08, 4.5}, {11.45, 5}, {12.77, 5.5}, {14.14, 6}, - //{15.46, 6.5}, {16.83, 7}, {17.48, 7.25}, {18.15, 7.5}, {18.83, 7.75}, {19.53, 8}, {19.98, 8.5}, {19.98, 9}, {19.98, 9.5}, {19.98, 10}})); - } - - } +using System; +using System.Collections; + +using NationalInstruments.DAQmx; + +using DAQ.Pattern; + +namespace DAQ.HAL +{ + /// + /// This is the specific hardware that the edm machine has. This class conforms + /// to the Hardware interface. + /// + public class PXISympatheticHardware : DAQ.HAL.Hardware + { + + public PXISympatheticHardware() + { + + // add the boards + Boards.Add("multiDAQ", "/PXI1Slot6"); + Boards.Add("aoBoard", "/PXI1Slot5"); + Boards.Add("usbDAQ", "/Dev1"); + + + string multiDAQ = (string)Boards["multiDAQ"]; + string aoBoard = (string)Boards["aoBoard"]; + string usbDAQ = (string)Boards["usbDAQ"]; + + // add things to the info + Info.Add("PGClockLine", multiDAQ + "/PFI14"); + Info.Add("PatternGeneratorBoard", multiDAQ); + Info.Add("PGClockCounter", "/ctr0"); + Info.Add("APGClockCounter", aoBoard + "/ctr0"); + Info.Add("AOPatternTrigger", aoBoard + "/PFI0"); + Info.Add("MOTMasterDigitalPatternClockFrequency", 10000); + Info.Add("MOTMasterAnalogPatternClockFrequency", 10000); + + Info.Add("Element", "Li"); + //Test this + //Info.Add("PGType", "dedicated"); + Info.Add("PGType", "integrated"); + + + // map the digital output channels + // Control of atoms + AddDigitalOutputChannel("MOTMasterPatternTrigger", multiDAQ, 0, 0); + + AddDigitalOutputChannel("aom0enable", multiDAQ, 0, 0); + AddDigitalOutputChannel("aom1enable", multiDAQ, 0, 1); + AddDigitalOutputChannel("aom2enable", multiDAQ, 0, 2); + AddDigitalOutputChannel("aom3enable", multiDAQ, 0, 3); + + + AddDigitalOutputChannel("CameraTrigger", multiDAQ, 0, 4); + AddDigitalOutputChannel("AnalogPatternTrigger", multiDAQ, 0, 5); + AddDigitalOutputChannel("TranslationStageTrigger", multiDAQ, 0, 6); + AddDigitalOutputChannel("shutterenable", multiDAQ, 1, 1); + + /* + //Control of molecules + AddDigitalOutputChannel("valve", multiDAQ, 0, 0); + AddDigitalOutputChannel("valve2", multiDAQ, 0, 1); + AddDigitalOutputChannel("q", multiDAQ, 0, 2); + AddDigitalOutputChannel("discharge", multiDAQ, 0, 3); + AddDigitalOutputChannel("aom", multiDAQ, 0, 4); + AddDigitalOutputChannel("flash2", multiDAQ, 0, 5); + AddDigitalOutputChannel("q2", multiDAQ, 0, 6); + AddDigitalOutputChannel("detector", multiDAQ, 0, 7); + AddDigitalOutputChannel("detectorprime", multiDAQ, 0, 8); + AddDigitalOutputChannel("flash", multiDAQ, 0, 9); + */ + + + + // map the analog input channels + AddAnalogInputChannel("pmt", multiDAQ + "/ai0", AITerminalConfiguration.Rse); //Pin 68 + AddAnalogInputChannel("lockcavity", multiDAQ + "/ai1", AITerminalConfiguration.Rse); //Pin 33 + AddAnalogInputChannel("probepower", multiDAQ + "/ai9", AITerminalConfiguration.Rse); //Pin 66 + + AddAnalogInputChannel("laserLockErrorSignal", multiDAQ + "/ai2", AITerminalConfiguration.Rse); + AddAnalogInputChannel("chamber1Pressure", usbDAQ + "/ai0", AITerminalConfiguration.Differential); + AddAnalogInputChannel("chamber2Pressure", usbDAQ + "/ai1", AITerminalConfiguration.Differential); + // map the analog output channels + // Control of atoms + AddAnalogOutputChannel("aom0amplitude", aoBoard + "/ao16"); + AddAnalogOutputChannel("aom0frequency", aoBoard + "/ao9"); + AddAnalogOutputChannel("aom1amplitude", aoBoard + "/ao10"); + AddAnalogOutputChannel("aom1frequency", aoBoard + "/ao11"); + AddAnalogOutputChannel("aom2amplitude", aoBoard + "/ao12"); + AddAnalogOutputChannel("aom2frequency", aoBoard + "/ao13"); + AddAnalogOutputChannel("aom3amplitude", aoBoard + "/ao14"); + AddAnalogOutputChannel("aom3frequency", aoBoard + "/ao15"); + AddAnalogOutputChannel("coil0current", aoBoard + "/ao8"); + AddAnalogOutputChannel("coil1current", aoBoard + "/ao17"); + AddAnalogOutputChannel("laser", aoBoard + "/ao1"); + AddAnalogOutputChannel("cavity", multiDAQ + "/ao1"); + + + //Control of molecules + //AddAnalogOutputChannel("laser", aoBoard + "/ao0"); // Pin 22 + //AddAnalogOutputChannel("highvoltage", aoBoard + "/ao1"); // Note - this is just here because a channel called "highvoltage" has been hard-wired into DecelerationHardwareControl - this needs to be rectified + //AddAnalogOutputChannel("cavity", aoBoard + "/ao1"); // Pin 21 + + // map the counter channels + AddCounterChannel("pmt", multiDAQ + "/ctr0"); //Source is pin 37, gate is pin 3, out is pin 2 + AddCounterChannel("sample clock", multiDAQ + "/ctr1"); //Source is pin 42, gate is pin 41, out is pin 40 + + // Calibrations + AddCalibration("chamber1Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); + AddCalibration("chamber2Pressure", new PowerCalibration(1, 0, 10.875, 1, 10)); + //AddCalibration("aom3frequency", new PolynomialCalibration + //(new double[] {-27.2757, 0.698297, -0.0075598, 0.000045057, -1.33872 * Math.Pow(10,-7), 1.57402* Math.Pow(10, -10)})); + AddCalibration("aom0frequency", new PolynomialCalibration(new double[] + {9.73471, -0.389447, 0.00439124, -0.0000200009, 4.27697*Math.Pow(10,-8), -3.44365*Math.Pow(10,-11)}, 130, 260)); + AddCalibration("aom1frequency", new PolynomialCalibration(new double[] + {-11.9562, 0.185676, -0.00161757, 0.0000109047, -3.54351*Math.Pow(10,-8), 4.35218*Math.Pow(10,-11)}, 130, 260)); + AddCalibration("aom2frequency", new PolynomialCalibration(new double[] + { 0.471968, -0.139565, 0.00173958, -6.18839 * Math.Pow(10, -6), 7.4987 * Math.Pow(10, -9), 8.99272 * Math.Pow(10, -13) }, 130,260)); + AddCalibration("aom3frequency", new PolynomialCalibration(new double[] + {0.879515, -0.143097, 0.00170292, -5.6672*Math.Pow(10,-6), 5.44491*Math.Pow(10,-9), 3.56736*Math.Pow(10,-12)},130,260)); + //AddCalibration("coil0current", new LinearInterpolationCalibration(new double[,] {{0.0, 0.0}, {0.0, 0.5}, {0.23, 0.75}, {0.82, 1}, {1.44, 1.25}, + //{2.1, 1.5}, {2.75, 1.75}, {3.41, 2}, {4.73, 2.5}, {6.08, 3}, {7.4, 3.5}, {8.76, 4}, {10.08, 4.5}, {11.45, 5}, {12.77, 5.5}, {14.14, 6}, + //{15.46, 6.5}, {16.83, 7}, {17.48, 7.25}, {18.15, 7.5}, {18.83, 7.75}, {19.53, 8}, {19.98, 8.5}, {19.98, 9}, {19.98, 9.5}, {19.98, 10}})); + } + + } } \ No newline at end of file diff --git a/DAQ/PatternBuilder32.cs b/DAQ/PatternBuilder32.cs index 2dfad2c1..85860858 100644 --- a/DAQ/PatternBuilder32.cs +++ b/DAQ/PatternBuilder32.cs @@ -20,7 +20,7 @@ public class PatternBuilder32 : IPatternSource private bool timeOrdered = true; [NonSerialized] private Layout layout; - private UInt32[] pattern; + protected UInt32[] pattern; private Int16[] patternInt16; private byte[] bytePattern; [NonSerialized] @@ -47,8 +47,8 @@ public void AddEdge( int channel, int time, bool sense ) if (timeOrdered) { // check the time ordering - if ( time > latestTimes[channel] ) latestTimes[channel] = time; - else throw new TimeOrderException(); + if (time > latestTimes[channel]) latestTimes[channel] = time; + else throw new TimeOrderException(); } // add the edge layout.AddEdge(channel, time, sense); @@ -85,8 +85,23 @@ public int DownPulse(int startTime, int delay, int duration, string channel) return DownPulse(startTime, delay, duration, ((DigitalOutputChannel)Environs.Hardware.DigitalOutputChannels[channel]).BitNumber); } - /** Convenience method to determine the channel number from a NI port/line spec. */ - public static int ChannelFromNIPort(int port, int line) + + public int Pulse(int clockFrequency,double startTime, double delay, double duration, string channel) + { + + return Pulse((int)(startTime * clockFrequency), (int)(delay * clockFrequency), (int)(duration * clockFrequency), channel); + } + public void AddEdge(string channel, double time, bool sense, int clockFrequency) + { + AddEdge(channel, (int)(time * clockFrequency), sense); + } + public int DownPulse(int clockFrequency,double startTime, double delay, double duration, string channel) + { + return DownPulse((int)(startTime * clockFrequency), (int)(delay * clockFrequency), (int)(duration * clockFrequency), channel); + } + + /** Convenience method to determine the channel number from a NI port/line spec. */ + public static int ChannelFromNIPort(int port, int line) { return line + (8 * port); } @@ -98,7 +113,7 @@ public void Clear() latestTimes = new int[32]; for (int i = 0 ; i < 32 ; i++) latestTimes[i] = -1; pattern = null; - } + } /** Get the layout for this pattern. */ public Layout Layout @@ -126,7 +141,7 @@ public int GetMinimumLength() } /** Generate the pattern. */ - public void BuildPattern( int length ) + public virtual void BuildPattern( int length ) { // Are there any events ? if (layout.EventTimes.Count == 0) @@ -187,7 +202,7 @@ public void BuildPattern( int length ) } - private UInt32 GenerateNextInt( UInt32 previousInt, EdgeSet es, bool throwError, int time) + public UInt32 GenerateNextInt( UInt32 previousInt, EdgeSet es, bool throwError, int time) { // build a bit mask for the upwards edges UInt32 upMask = 0; diff --git a/DAQ/RFMOTHardware.cs b/DAQ/RFMOTHardware.cs new file mode 100644 index 00000000..9123767a --- /dev/null +++ b/DAQ/RFMOTHardware.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NationalInstruments.DAQmx; + +namespace DAQ.HAL +{ + /// + /// This is the specific hardware that the RF MOT experiment has. This class conforms + /// to the Hardware interface. + /// + public class RFMOTHardware : DAQ.HAL.Hardware + { + public RFMOTHardware() + { + + Boards.Add("analog", "/PXI1Slot4"); + + Boards.Add("multiDAQPCI", "/Dev1"); + + string daqBoard = (string)Boards["analog"]; + + string multiDAQ = (string)Boards["multiDAQPCI"]; + + #region PXI AO Card + + #region DO channels + + AddDigitalOutputChannel("repumpShutter", daqBoard, 0, 0); + + AddDigitalOutputChannel("coolaom2", daqBoard, 0, 1); + + AddDigitalOutputChannel("coolaom", daqBoard, 0, 2); + + AddDigitalOutputChannel("camtrig", daqBoard, 0, 3); + + AddDigitalOutputChannel("ctrInputSelect", daqBoard, 0, 6); + + AddDigitalOutputChannel("AnalogPatternTrigger", daqBoard, 0, 5); + + AddDigitalOutputChannel("refaom", daqBoard, 0, 7); + + #endregion + + #region AO Channels + + AddAnalogOutputChannel("motfet", daqBoard + "/ao0"); + + AddAnalogOutputChannel("coolsetpt", daqBoard + "/ao1"); + + AddAnalogOutputChannel("motlightatn2", daqBoard + "/ao2"); + + AddAnalogOutputChannel("motlightatn", daqBoard + "/ao3"); + + AddAnalogOutputChannel("coolingfeedfwd", daqBoard + "/ao5"); + + AddAnalogOutputChannel("zbias", daqBoard + "/ao7"); + + #endregion + + #endregion + + + #region PCI AI Card + + #region AO + + AddAnalogOutputChannel("biasA", multiDAQ + "/ao0"); + + AddAnalogOutputChannel("biasB", multiDAQ + "/ao1"); + + #endregion + + #region DO + + AddDigitalOutputChannel("PCIDOTest", multiDAQ, 0, 0); + + AddDigitalOutputChannel("multiDAQDO1", multiDAQ, 0, 1); + + #endregion + + #region AI + + AddAnalogInputChannel("multiDAQAI1", multiDAQ + "/ai1", AITerminalConfiguration.Differential); + + AddAnalogInputChannel("coolerrsig", multiDAQ + "/ai2", AITerminalConfiguration.Differential); + + AddAnalogInputChannel("MOTCoilSense", multiDAQ + "/ai3", AITerminalConfiguration.Differential); + + AddAnalogInputChannel("MOTFluoresence", multiDAQ + "/ai4", AITerminalConfiguration.Differential); + + AddAnalogInputChannel("MOTFieldGradient", multiDAQ + "/ai6", AITerminalConfiguration.Differential); + + #endregion + + #endregion + //AddCounterChannel("pmt", multiDAQ + "/ctr0"); + + Instruments.Add("dds", new NovatechSerialPort()); + // AddCounterChannel("PGClockCounter", daqBoard + "/ctr0"); + + Instruments.Add("mcFrqCtr", new mcFreqCtr()); + // Info.Add("PGClockLine", daqBoard + "/PFI5"); + + Info.Add("PGClockLine", multiDAQ + "/PFI0");//This is the channel that the AO sample clock will be exported TO on the PCI Card. + Info.Add("PatternGeneratorBoard", daqBoard); + Info.Add("PGClockCounter", "/ctr0"); + Info.Add("APGClockCounter", daqBoard + "/ctr0"); + Info.Add("AOClockSource", daqBoard + "/ctr0"); + Info.Add("AOPatternTrigger", daqBoard + "/PFI0"); + Info.Add("AIAcquireTrigger", multiDAQ + "/PFI1"); + Info.Add("PGType", "integrated"); + // Info.Add("PGTrigger",); + + AddCalibration("MOTFieldGradient", new PolynomialCalibration(new double[] {-0.0156971,-2.06836},-10.0,10.0)); + } + } +} diff --git a/DAQ/RS232Instrument.cs b/DAQ/RS232Instrument.cs index 034f8bfe..ef24da46 100644 --- a/DAQ/RS232Instrument.cs +++ b/DAQ/RS232Instrument.cs @@ -14,6 +14,7 @@ public class RS232Instrument : Instrument protected SerialSession serial; protected string address; protected bool connected = false; + protected int baudrate = 9600; public RS232Instrument(String visaAddress) { @@ -31,10 +32,11 @@ protected void Connect(SerialTerminationMethod method) if (!Environs.Debug) { serial = new SerialSession(address); - serial.BaudRate = 9600; + serial.BaudRate = this.baudrate; serial.DataBits = 8; serial.StopBits = StopBitType.One; serial.ReadTermination = method; + serial.WriteTermination = method; } connected = true; } @@ -60,6 +62,12 @@ protected void Write(byte[] command) Disconnect(); } + protected void Write(string command, bool keepOpen) + { + if (!connected) Connect(); + if (!Environs.Debug) serial.Write(command); + if (!keepOpen)Disconnect(); + } protected string Query(string q) { return serial.Query(q); diff --git a/DAQ/RS232Sequencer.cs b/DAQ/RS232Sequencer.cs new file mode 100644 index 00000000..f922caf0 --- /dev/null +++ b/DAQ/RS232Sequencer.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NationalInstruments.DAQmx; +using NationalInstruments.VisaNS; +using DAQ.Environment; +using DAQ.HAL; + +namespace DAQ.Pattern +{ + /// + /// This is a class to build a sequence of RS232 commands that is then output by the pattern generator. Since these cannot be hardware timed the output of these commands is timed using a software clock which starts at the same time as the hardware timed DAQmx tasks. + /// + public class RS232Sequencer + { + [NonSerialized] + private bool timeOrdered = true; + private Dictionary latestTimes; + private List pattern; + + /// + /// This is used to encapsulate the rs232 commands as a time-ordered list + /// + private struct RS232Command + { + private string channel; + private string command; + private int time; + + public RS232Command(string channel, string command, int time) + { + this.channel = channel; + this.command = command; + this.time = time; + } + } + public RS232Sequencer() + { + Clear(); + } + public void AddCommand(string channel, string command, int time) + { + if (timeOrdered) + { + if (!latestTimes.ContainsKey(channel) || time > latestTimes[channel]) latestTimes[channel] = time; + else throw new TimeOrderException(); + } + pattern.Add(new RS232Command(channel, command, time)); + } + + public void Clear() + { + pattern = new List(); + latestTimes = new Dictionary(); + } + } +} diff --git a/DAQ/SumGaussianFitter.cs b/DAQ/SumGaussianFitter.cs index 8c64b472..f072008b 100644 --- a/DAQ/SumGaussianFitter.cs +++ b/DAQ/SumGaussianFitter.cs @@ -1,59 +1,59 @@ -using System; - - -namespace DAQ.Analyze -{ - public class SumGaussianFitter:DAQ.Analyze.PeakFitter - { - - - - public SumGaussianFitter() - { - Name = "SumGaussian"; - model = sumGaussian; - } - - // takes the parameters (in this order, in the double[]) - // N1: background - // Q1: signal - // c1: centre - // w1: width - // N2: background - // Q2: signal - // c2: centre - // w2: width - - protected void sumGaussian(double[] parameters, double[] x, ref double func, object obj) - { - double n1 = parameters[0]; - double q1 = parameters[1]; - double c1 = parameters[2]; - double w1 = parameters[3]; - double n2 = parameters[4]; - double q2 = parameters[5]; - double c2 = parameters[6]; - double w2 = parameters[7]; - if (w1 == 0) w1 = 0.001; // watch out for divide by zero - if (w2 == 0) w2 = 0.001; - func = n1 + q1 * Math.Exp(-Math.Pow(x[0] - c1, 2) / ((2 / 5.52) * Math.Pow(w1, 2))) + n2 + q2 * Math.Exp(-Math.Pow(x[0] - c2, 2) / ((2 / 5.52) * Math.Pow(w2, 2))); - } - - public override string ParameterReport - { - get - { - return "n1: " + lastFittedParameters[0].ToString("G3") + - " q1: " + lastFittedParameters[1].ToString("G3") + - " c1: " + lastFittedParameters[2].ToString("G6") + - " w1: " + lastFittedParameters[3].ToString("G3")+ - " n2: " + lastFittedParameters[4].ToString("G3") + - " q2: " + lastFittedParameters[5].ToString("G3") + - " c2: " + lastFittedParameters[6].ToString("G6") + - " w2: " + lastFittedParameters[7].ToString("G3"); - } - } - } -} - - +using System; + + +namespace DAQ.Analyze +{ + public class SumGaussianFitter:DAQ.Analyze.PeakFitter + { + + + + public SumGaussianFitter() + { + Name = "SumGaussian"; + model = sumGaussian; + } + + // takes the parameters (in this order, in the double[]) + // N1: background + // Q1: signal + // c1: centre + // w1: width + // N2: background + // Q2: signal + // c2: centre + // w2: width + + protected void sumGaussian(double[] parameters, double[] x, ref double func, object obj) + { + double n1 = parameters[0]; + double q1 = parameters[1]; + double c1 = parameters[2]; + double w1 = parameters[3]; + double n2 = parameters[4]; + double q2 = parameters[5]; + double c2 = parameters[6]; + double w2 = parameters[7]; + if (w1 == 0) w1 = 0.001; // watch out for divide by zero + if (w2 == 0) w2 = 0.001; + func = n1 + q1 * Math.Exp(-Math.Pow(x[0] - c1, 2) / ((2 / 5.52) * Math.Pow(w1, 2))) + n2 + q2 * Math.Exp(-Math.Pow(x[0] - c2, 2) / ((2 / 5.52) * Math.Pow(w2, 2))); + } + + public override string ParameterReport + { + get + { + return "n1: " + lastFittedParameters[0].ToString("G3") + + " q1: " + lastFittedParameters[1].ToString("G3") + + " c1: " + lastFittedParameters[2].ToString("G6") + + " w1: " + lastFittedParameters[3].ToString("G3")+ + " n2: " + lastFittedParameters[4].ToString("G3") + + " q2: " + lastFittedParameters[5].ToString("G3") + + " c2: " + lastFittedParameters[6].ToString("G6") + + " w2: " + lastFittedParameters[7].ToString("G3"); + } + } + } +} + + diff --git a/DAQ/SunshineFileSystem.cs b/DAQ/SunshineFileSystem.cs index de9c1f32..dcdfa17d 100644 --- a/DAQ/SunshineFileSystem.cs +++ b/DAQ/SunshineFileSystem.cs @@ -1,31 +1,31 @@ -using System; - -namespace DAQ.Environment -{ - public class SunshineFileSystem : DAQ.Environment.FileSystem - { - public SunshineFileSystem() - { - Paths.Add("settingsPath", "c:\\Control Programs\\Settings\\"); - Paths.Add("scanMasterDataPath", "c:\\Data\\LCMCaF\\"); - Paths.Add("mathPath", "c:/program files/wolfram research/mathematica/7.0/mathkernel.exe"); - Paths.Add("fakeData", "c:\\Data\\examples\\"); - // Paths.Add("decelerationUtilitiesPath", "d:\\Tools\\"); - Paths.Add("vcoLockData", "c:\\Data\\VCO Lock\\"); - Paths.Add("transferCavityData", "c:\\Data\\LCMCaF\\TCL\\"); - - Paths.Add("MOTMasterDataPath", "c:\\Data\\MOTMasterData\\"); - Paths.Add("scriptListPath", "C:\\Control Programs\\EDMSuite\\MoleculeMOTMasterScripts"); - Paths.Add("daqDLLPath", "C:\\Control Programs\\EDMSuite\\DAQ\\bin\\Decelerator\\daq.dll"); - Paths.Add("MOTMasterExePath", - "C:\\Control Programs\\EDMSuite\\MOTMaster\\bin\\Decelerator\\"); - Paths.Add("UntriggeredCameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\SHCCameraAttributes.txt"); - Paths.Add("CameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\MOTMasterCameraAttributes.txt"); - Paths.Add("HardwareClassPath", "C:\\Control Programs\\EDMSuite\\DAQ\\DecelerationHardware.cs"); - - DataSearchPaths.Add(Paths["scanMasterDataPath"]); - - SortDataByDate = false; - } - } -} +using System; + +namespace DAQ.Environment +{ + public class SunshineFileSystem : DAQ.Environment.FileSystem + { + public SunshineFileSystem() + { + Paths.Add("settingsPath", "c:\\Control Programs\\Settings\\"); + Paths.Add("scanMasterDataPath", "c:\\Data\\LCMCaF\\"); + Paths.Add("mathPath", "c:/program files/wolfram research/mathematica/7.0/mathkernel.exe"); + Paths.Add("fakeData", "c:\\Data\\examples\\"); + // Paths.Add("decelerationUtilitiesPath", "d:\\Tools\\"); + Paths.Add("vcoLockData", "c:\\Data\\VCO Lock\\"); + Paths.Add("transferCavityData", "c:\\Data\\LCMCaF\\TCL\\"); + + Paths.Add("MOTMasterDataPath", "c:\\Data\\MOTMasterData\\"); + Paths.Add("scriptListPath", "C:\\Control Programs\\EDMSuite\\MoleculeMOTMasterScripts"); + Paths.Add("daqDLLPath", "C:\\Control Programs\\EDMSuite\\DAQ\\bin\\Decelerator\\daq.dll"); + Paths.Add("MOTMasterExePath", + "C:\\Control Programs\\EDMSuite\\MOTMaster\\bin\\Decelerator\\"); + Paths.Add("UntriggeredCameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\SHCCameraAttributes.txt"); + Paths.Add("CameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\MOTMasterCameraAttributes.txt"); + Paths.Add("HardwareClassPath", "C:\\Control Programs\\EDMSuite\\DAQ\\DecelerationHardware.cs"); + + DataSearchPaths.Add(Paths["scanMasterDataPath"]); + + SortDataByDate = false; + } + } +} diff --git a/DAQ/TCLConfig.cs b/DAQ/TCLConfig.cs index 968426b5..862454d2 100644 --- a/DAQ/TCLConfig.cs +++ b/DAQ/TCLConfig.cs @@ -1,146 +1,146 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; - -namespace DAQ.TransferCavityLock2012 -{ - public class TCLConfig - { - - public TCLConfig(string name) - { - configurationName = name; - slaveVoltageUpperLimit = 5.0; - slaveVoltageLowerLimit = 0.0; - defaultGain = 0.5; - defaultLaserVoltage = 0.0; - maxInputVoltage = 10.0; - defaultScanPoints = 1000; - analogSampleRate = 50000; - } - - private string configurationName; - public string Name - { - get { return configurationName; } - set { configurationName = value; } - } - - private int tcpChannel; - public int TCPChannel - { - get { return tcpChannel; } - set { tcpChannel = value; } - } - - private string masterLaser; - public string MasterLaser - { - get { return masterLaser; } - set { masterLaser = value; } - } - - private string cavity; - public string Cavity - { - get { return cavity; } - set { cavity = value; } - } - - private double slaveVoltageUpperLimit; - public double SlaveVoltageUpperLimit - { - get { return slaveVoltageUpperLimit; } - set { slaveVoltageUpperLimit = value; } - } - - private double slaveVoltageLowerLimit; - public double SlaveVoltageLowerLimit - { - get { return slaveVoltageLowerLimit; } - set { slaveVoltageLowerLimit = value; } - } - - private double defaultGain; - public double DefaultGain - { - get { return defaultGain; } - set { defaultGain = value; } - } - - private double defaultLaserVoltage; - public double DefaultLaserVoltage - { - get { return defaultLaserVoltage; } - set { defaultLaserVoltage = value; } - } - - private double maxInputVoltage; - public double MaxInputVoltage - { - get { return maxInputVoltage; } - set { maxInputVoltage = value; } - } - - private int defaultScanPoints; - public int DefaultScanPoints - { - get { return defaultScanPoints; } - set { defaultScanPoints = value; } - } - - private double analogSampleRate; - public double AnalogSampleRate - { - get { return analogSampleRate; } - set { analogSampleRate = value; } - } - - - private string trigger; - public string Trigger - { - get { return trigger; } - set { trigger = value; } - } - - private string ramp; - public string Ramp - { - get { return ramp; } - set { ramp = value; } - } - - private Dictionary lasers = new Dictionary(); - - public Dictionary Lasers - { - get { return lasers; } - set { lasers = value; } - } - - - public void AddLaser(string name, string photodiode) - { - Lasers.Add(name, photodiode); - } - - - - - - - - - - - - - - - - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; + +namespace DAQ.TransferCavityLock2012 +{ + public class TCLConfig + { + + public TCLConfig(string name) + { + configurationName = name; + slaveVoltageUpperLimit = 5.0; + slaveVoltageLowerLimit = 0.0; + defaultGain = 0.5; + defaultLaserVoltage = 0.0; + maxInputVoltage = 10.0; + defaultScanPoints = 1000; + analogSampleRate = 50000; + } + + private string configurationName; + public string Name + { + get { return configurationName; } + set { configurationName = value; } + } + + private int tcpChannel; + public int TCPChannel + { + get { return tcpChannel; } + set { tcpChannel = value; } + } + + private string masterLaser; + public string MasterLaser + { + get { return masterLaser; } + set { masterLaser = value; } + } + + private string cavity; + public string Cavity + { + get { return cavity; } + set { cavity = value; } + } + + private double slaveVoltageUpperLimit; + public double SlaveVoltageUpperLimit + { + get { return slaveVoltageUpperLimit; } + set { slaveVoltageUpperLimit = value; } + } + + private double slaveVoltageLowerLimit; + public double SlaveVoltageLowerLimit + { + get { return slaveVoltageLowerLimit; } + set { slaveVoltageLowerLimit = value; } + } + + private double defaultGain; + public double DefaultGain + { + get { return defaultGain; } + set { defaultGain = value; } + } + + private double defaultLaserVoltage; + public double DefaultLaserVoltage + { + get { return defaultLaserVoltage; } + set { defaultLaserVoltage = value; } + } + + private double maxInputVoltage; + public double MaxInputVoltage + { + get { return maxInputVoltage; } + set { maxInputVoltage = value; } + } + + private int defaultScanPoints; + public int DefaultScanPoints + { + get { return defaultScanPoints; } + set { defaultScanPoints = value; } + } + + private double analogSampleRate; + public double AnalogSampleRate + { + get { return analogSampleRate; } + set { analogSampleRate = value; } + } + + + private string trigger; + public string Trigger + { + get { return trigger; } + set { trigger = value; } + } + + private string ramp; + public string Ramp + { + get { return ramp; } + set { ramp = value; } + } + + private Dictionary lasers = new Dictionary(); + + public Dictionary Lasers + { + get { return lasers; } + set { lasers = value; } + } + + + public void AddLaser(string name, string photodiode) + { + Lasers.Add(name, photodiode); + } + + + + + + + + + + + + + + + + + } +} diff --git a/DAQ/TEW105FileSystem.cs b/DAQ/TEW105FileSystem.cs new file mode 100644 index 00000000..8d43b9d8 --- /dev/null +++ b/DAQ/TEW105FileSystem.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DAQ +{ + class TEW105FileSystem : DAQ.Environment.FileSystem + { + public TEW105FileSystem() + { + Paths.Add("MOTMasterDataPath", "c:\\Data\\MOTMasterData\\"); + Paths.Add("scriptListPath", "C:\\Users\\rfmot\\EDMSuite\\RFMOTMOTMasterScripts\\"); + Paths.Add("daqDLLPath", "C:\\Users\\rfmot\\EDMSuite\\DAQ\\bin\\RFMOT\\daq.dll"); + Paths.Add("MOTMasterExePath", + "C:\\Users\\rfmot\\EDMSuite\\MOTMaster\\bin\\RFMOT\\"); + Paths.Add("UntriggeredCameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\RFMOTCameraAttributes.txt"); + Paths.Add("CameraAttributesPath", "c:\\Data\\Settings\\CameraAttributes\\MOTMasterCameraAttributes.txt"); + Paths.Add("HardwareClassPath", "C:\\Users\\rfmot\\EDMSuite\\DAQ\\RFMOTHardware.cs"); + Paths.Add("settingsPath", "c:\\Data\\Settings\\"); + Paths.Add("DataPath", "c:\\Data\\"); + } + } +} diff --git a/DAQ/WindFreakSynth.cs b/DAQ/WindFreakSynth.cs new file mode 100644 index 00000000..7945418b --- /dev/null +++ b/DAQ/WindFreakSynth.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NationalInstruments.VisaNS; + +namespace DAQ.HAL +{ + public class WindfreakSynth : RS232Instrument + { + + public static class CommandTypes + { + public static String Frequency { get { return "f"; } } + public static String Amplitude { get { return "W"; } } + public static String Lookup { get { return "L"; } } + public static String PA { get { return "r"; } } + public static String PLL { get { return "E"; } } + public static String Trigger { get { return "w"; } } + public static String Channel { get { return "C"; } } + public static String RFPower { get { return "h"; } } + } + + public enum TriggerTypes + { + Continuous = 0, + Pulse = 4 + } + + public class WindfreakChannel + { + protected double maxFreq = 13600.0; + protected double minFreq = 54.0; + protected double maxAmp = 20.0; + protected double minAmp = -75.0; + + protected double frequency; + protected double amplitude; + protected bool channelName; + protected bool rfOn; + protected WindfreakSynth windfreak; + + public WindfreakChannel(WindfreakSynth windfreak, bool channelName) + { + this.channelName = channelName; + this.windfreak = windfreak; + } + + protected void ValidateEntry(double value, double maxValue, double minValue, string name, string unit) + { + if (value > maxValue || value < minValue) + { + throw new System.ArgumentException( + value.ToString() + " is not a valid value for " + name + ". Value must lie between " + + minValue.ToString() + "-" + maxValue.ToString() + " " + unit + ); + } + } + + protected void Write(string command) + { + string channelChangeCommand = CommandTypes.Channel + Convert.ToInt32(channelName).ToString(); + windfreak.Write(channelChangeCommand + command); + } + + protected void ValidateFrequency(double freq) + { + ValidateEntry(freq, maxFreq, minFreq, "Frequency", "MHz"); + } + + protected void ValidateAmplitude(double amp) + { + ValidateEntry(amp, maxAmp, minAmp, "Amplitude", "dBm"); + } + + protected string FreqCommand(double freq) + { + ValidateFrequency(freq); + return CommandTypes.Frequency + freq.ToString("F7"); // Round to 7 decimal places + } + + protected string AmpCommand(double amp) + { + ValidateAmplitude(amp); + return CommandTypes.Amplitude + amp.ToString("F2"); // Round to 2 decimal places + } + + public double Frequency + { + get { return frequency; } + set + { + Write(FreqCommand(value)); + frequency = value; + } + } + + public double Amplitude + { + get { return amplitude; } + set + { + Write(AmpCommand(value)); + amplitude = value; + } + } + + public bool RFOn + { + get { return rfOn; } + set + { + string stateString = Convert.ToInt32(value).ToString(); + Write(CommandTypes.PLL + stateString + CommandTypes.PA + stateString); + rfOn = value; + } + } + + public void ResetOutput(bool output) + { + Write(CommandTypes.RFPower + Convert.ToInt32(output).ToString()); + } + + public void SyncSettings(string[] settings) + { + frequency = Convert.ToDouble(settings[0]); + amplitude = Convert.ToDouble(settings[1]); + rfOn = Convert.ToBoolean(Convert.ToInt32(settings[2])); + } + } + + public WindfreakChannel ChannelA; + public WindfreakChannel ChannelB; + + protected new int BaudRate = 115200; // Device can accept higher data transfer rate than default for class of 9600 + + public WindfreakSynth(string address) + : base(address) + { + ChannelA = new WindfreakChannel(this, false); + ChannelB = new WindfreakChannel(this, true); + } + + public WindfreakChannel Channel(bool channel) + { + return channel ? ChannelB : ChannelA; + } + + protected TriggerTypes triggerMode; + public TriggerTypes TriggerMode + { + get { return triggerMode; } + set + { + Write(CommandTypes.Trigger + value.ToString("d")); + Console.Write(CommandTypes.Trigger + value.ToString("d")); + // For some reason, it is necessary to make sure the output is on after changing the trigger mode to continuous + if (value == TriggerTypes.Continuous) + { + ChannelA.ResetOutput(true); + ChannelB.ResetOutput(true); + } + triggerMode = value; + } + } + + protected new string Query(string command) + { + if (!connected) Connect(SerialTerminationMethod.TerminationCharacter); + string response = base.Query(command); + Disconnect(); + return response; + } + + public void ReadSettingsFromDevice() + { + string[] deviceCommands = new string[] { CommandTypes.Trigger }; + string deviceQueries = string.Concat(deviceCommands.Select(command => command + "?").ToArray()); + string[] channelCommands = new string[] { CommandTypes.Frequency, CommandTypes.Amplitude, CommandTypes.PLL }; + string channelQueries = string.Concat(channelCommands.Select(command => command + "?").ToArray()); + + Connect(SerialTerminationMethod.TerminationCharacter); + Write(deviceQueries + CommandTypes.Channel + "0" + channelQueries + CommandTypes.Channel + "1" + channelQueries, true); + + int numberCommands = deviceCommands.Length + 2 * channelCommands.Length; + string[] responses = new string[numberCommands]; + for (int i = 0; i < numberCommands; i++) + { + string response = Read(); + responses[i] = response.Substring(0, response.Length - 1); + } + Disconnect(); + + bool[] channels = new bool[2] { false, true }; + triggerMode = (TriggerTypes)Convert.ToInt32(responses[0]); + ChannelA.SyncSettings(responses.Skip(1).Take(3).ToArray()); + ChannelB.SyncSettings(responses.Skip(4).Take(3).ToArray()); + } + + } +} \ No newline at end of file diff --git a/DAQ/niHSDIO.cs b/DAQ/niHSDIO.cs new file mode 100644 index 00000000..05861e95 --- /dev/null +++ b/DAQ/niHSDIO.cs @@ -0,0 +1,11242 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Measurement Studio for NI-HSDIO 15.0. +// +// Documentation is available at StartProgramsNational InstrumentsNI-HSDIODocumentation>>NI Digital Waveform Generator/Analyzer Help. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace NationalInstruments.ModularInstruments.Interop +{ + /// + /// + /// + public class niHSDIO : object, System.IDisposable + { + private System.IntPtr _handle; + private bool _disposed = true; + /// + /// + /// + public struct nihsdio_wfminfo + { + /// + /// + /// + public System.Int64 absoluteTimestamp; + /// + /// + /// + public System.Int64 relativeTimestamp; + /// + /// + /// + public System.Int64 dt; + /// + /// + /// + public int actualSamplesRead; + /// + /// + /// + public System.Int64 reserved1; + /// + /// + /// + public System.Int64 reserved2; + } + private niHSDIO(System.IntPtr handle) + { + this._handle = handle; + this._disposed = false; + } + + /// + /// Creates a new acquisition session. You can perform static and dynamic acquisition operations with this session. + /// + /// Creating a new session does not automatically tristate your front panel terminals or channels that might be driving voltages from previous sessions (refer to the niHSDIO_close function for more information on lines left driving after closing a session). + /// + /// Pass VI_TRUE to the Reset_Instrument parameter to place your device in a known start-up when creating a new session. This action is equivalent to calling niHSDIO_reset, and it tristates the front panel terminals and channels. + /// + /// + /// + /// + /// Specifies the device name, for example, "Dev1" where "Dev1" is a device name assigned by Measurement and Automation Explorer. + /// + /// + /// + /// Specifies whether the driver performs an ID query on the device. When this parameter is set to VI_TRUE, NI-HSDIO ensures compatibility between the device and the driver. + /// + /// Defined Values: + /// - VI_TRUE(1) Perform ID query + /// - VI_FALSE(0) Skip ID query + /// + /// + /// + /// Specifies whether the driver resets the device during initialization of the session. Refer to the niHSDIO_reset function for more information on what happens during a device reset. + /// + /// Defined Values: + /// - VI_FALSE(0) - Do not reset device + /// - VI_TRUE(1) - Reset device + /// + /// NOTE: Resetting your device resets the ENTIRE device. Acquisition or generation operations in progress are aborted and cleared. + /// + /// + /// + /// Currently unused. Set this string to "". + /// + public static niHSDIO InitAcquisitionSession(string Resource_Name, bool ID_Query, bool Reset_Instrument, string Option_String) + { + System.IntPtr handle; + int pInvokeResult = PInvoke.InitAcquisitionSession(Resource_Name, System.Convert.ToUInt16(ID_Query), System.Convert.ToUInt16(Reset_Instrument), Option_String, out handle); + PInvoke.TestForError(System.IntPtr.Zero, pInvokeResult); + try + { + return new niHSDIO(handle); + } + catch (System.Exception e) + { + PInvoke.close(handle); + throw e; + } + } + + /// + ///Creates a new generation session. You can perform static and dynamic generation operations with this session. + /// + ///Creating a new session does not automatically tristate your front panel terminals or channels that might be driving voltages from previous sessions (refer to the niHSDIO_close function for more information on lines left driving after closing a session). + /// + ///Pass VI_TRUE to the resetInstrument parameter to place your device in a known start-up state when creating a new session. This action is equivalent to calling niHSDIO_reset, and it tristates the front panel terminals and channels. + /// + /// + /// + ///Specifies the device name, for example "Dev1" where "Dev1" is a device name assigned by Measurement and Automation Explorer. + /// + /// + ///Specifies whether the driver performs an ID query upon the device. When this parameter is set to VI_TRUE, the driver ensures compatibility between the device and driver. + /// + ///Defined Values: + ///- VI_TRUE(1) Perform ID query + ///- VI_FALSE(0) Skip ID query + /// + /// + /// + ///Specifies whether the driver resets the device during initialization of the session. Refer to the niHSDIO_reset function for more information on what happens during a device reset. + /// + ///Defined Values: + ///- VI_FALSE(0) - Do not reset device. + ///- VI_TRUE(1) - Reset device. + /// + ///NOTE: Resetting your device resets the ENTIRE device. Acquisition or generation operations in progress are aborted and cleared. + /// + /// + /// + /// + ///Currently unused. Set this string to "". + /// + public static niHSDIO InitGenerationSession(string Resource_Name, bool ID_Query, bool Reset_Instrument, string Option_String) + { + System.IntPtr handle; + int pInvokeResult = PInvoke.InitGenerationSession(Resource_Name, System.Convert.ToUInt16(ID_Query), System.Convert.ToUInt16(Reset_Instrument), Option_String, out handle); + PInvoke.TestForError(System.IntPtr.Zero, pInvokeResult); + try + { + return new niHSDIO(handle); + } + catch (System.Exception e) + { + PInvoke.close(handle); + throw e; + } + } + + /// + ///Creates and initializes a special NI-HSDIO external calibration session. The ViSession returned is an NI-HSDIO session that can be used during the calibration session. + /// + ///Multiple calls to this function return the same session ID. Calibration sessions are mutually exclusive with acquisition and generation sessions. + /// + /// + /// + /// + /// + /// + ///The calibration password required to open an external calibration session to the device. + /// + ///Default Value: "" + /// + public static niHSDIO InitExtCal(string Resource_Name, string Password) + { + System.IntPtr handle; + int pInvokeResult = PInvoke.InitExtCal(Resource_Name, Password, out handle); + PInvoke.TestForError(System.IntPtr.Zero, pInvokeResult); + try + { + return new niHSDIO(handle); + } + catch (System.Exception e) + { + PInvoke.close(handle); + throw e; + } + } + + /// + ///Configures the voltage levels for the data channels using a logic family. + /// + ///NOTE: Refer to the device documentation for descriptions of logic families and possible voltage restrictions. + /// + /// + /// + ///Identifies channels to apply settings. Use "" or VI_NULL to specify all channels. + /// + /// + ///Specifies the logic family for the data voltage levels. + /// + ///Defined Values: + /// + ///-NIHSDIO_VAL_1_8V_LOGIC + ///-NIHSDIO_VAL_2_5V_LOGIC + ///-NIHSDIO_VAL_3_3V_LOGIC + ///-NIHSDIO_VAL_5_0V_LOGIC + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDataVoltageLogicFamily(string Channel_List, int Logic_Family) + { + int pInvokeResult = PInvoke.ConfigureDataVoltageLogicFamily(this._handle, Channel_List, Logic_Family); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the voltage levels of the data channels using the specified high and low levels. + /// + ///NOTE: Refer to the device documentation for possible voltage restrictions. + /// + ///NOTE: If you are using an NI 654x device for generation sessions, set High_Level to the appropriate logic family value and set How_Level to 0. For acquisition sessions with the + ///NI 654x, select the same value for High_Level and Low_Level from the following list: 0.9 V, 1.25 V, or 1.65 V. + /// + /// + /// + ///Identifies channels to apply settings. Use "" or VI_NULL to specify all channels. + /// + /// + ///Specifies what voltage identifies logic low level. + /// + /// + /// + ///Specifies what voltage identifies logic high level. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDataVoltageCustomLevels(string Channel_List, double Low_Level, double High_Level) + { + int pInvokeResult = PInvoke.ConfigureDataVoltageCustomLevels(this._handle, Channel_List, Low_Level, High_Level); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the voltage levels for the trigger channels using a logic family. + /// + ///NOTE: Refer to the device documentation for descriptions of logic families and possible voltage restrictions. + /// + /// + /// + /// + /// + ///Specifies the logic family for the trigger voltage levels. + /// + ///Defined Values: + /// + ///-NIHSDIO_VAL_5_0V_LOGIC + ///-NIHSDIO_VAL_3_3V_LOGIC + ///-NIHSDIO_VAL_2_5V_LOGIC + ///-NIHSDIO_VAL_1_8V_LOGIC + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureTriggerVoltageLogicFamily(int Logic_Family) + { + int pInvokeResult = PInvoke.ConfigureTriggerVoltageLogicFamily(this._handle, Logic_Family); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the voltage levels of the trigger channels using user-defined high and low levels. + /// + ///NOTE: Refer to the device documentation for possible voltage restrictions. + /// + ///NOTE: If you are using an NI 654x device for generation sessions, set High_Level to the appropriate logic family value and set How_Level to 0. For acquisition sessions with the + ///NI 654x, select the same value for High_Level and Low_Level from the following list: 0.9 V, 1.25 V, or 1.65 V. + /// + /// + /// + /// + ///Specifies what voltage identifies logic low level. + /// + /// + /// + ///Specifies what voltage identifies logic high level. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureTriggerVoltageCustomLevels(double Low_Level, double High_Level) + { + int pInvokeResult = PInvoke.ConfigureTriggerVoltageCustomLevels(this._handle, Low_Level, High_Level); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the voltage levels for the event channels using a logic family. + /// + ///NOTE: Refer to the device documentation for descriptions of logic families and possible voltage restrictions. + /// + /// + ///Specifies the logic family for the event voltage levels. + /// + ///Defined Values: + /// + ///-NIHSDIO_VAL_1_8V_LOGIC + ///-NIHSDIO_VAL_2_5V_LOGIC + ///-NIHSDIO_VAL_3_3V_LOGIC + ///-NIHSDIO_VAL_5_0V_LOGIC + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureEventVoltageLogicFamily(int Logic_Family) + { + int pInvokeResult = PInvoke.ConfigureEventVoltageLogicFamily(this._handle, Logic_Family); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the voltage levels of the event channels using user-defined high and low levels. + /// + ///NOTE: Refer to the device documentation for possible voltage restrictions. + /// + ///NOTE: If you are using an NI 654x device for generation sessions, set High_Level to the appropriate logic family value and set How_Level to 0. For acquisition sessions with the + ///NI 654x, select the same value for High_Level and Low_Level from the following list: 0.9 V, 1.25 V, or 1.65 V. + /// + /// + /// + ///Specifies what voltage identifies logic low level. + /// + /// + /// + ///Specifies what voltage identifies logic high level. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureEventVoltageCustomLevels(double Low_Level, double High_Level) + { + int pInvokeResult = PInvoke.ConfigureEventVoltageCustomLevels(this._handle, Low_Level, High_Level); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures channels for dynamic acquisition (if vi is an acquisition session) or dynamic generation (if vi is a generation session). + /// + ///NOTE: A channel cannot be assigned to static generation and dynamic generation at the same time. + /// + /// + ///This string identifies which channels are reserved for dynamic operation. + /// + ///Valid Syntax: + ///"0-19" or "0-15,16-19" or "0-18,19" + ///"" (empty string) or VI_NULL to specify all channels + ///"none" to unassign all channels + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int AssignDynamicChannels(string Channel_List) + { + int pInvokeResult = PInvoke.AssignDynamicChannels(this._handle, Channel_List); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Commits any pending attributes to hardware and starts the dynamic operation (refer to niHSDIO_CommitDynamic for more information on committing). + /// + ///For an generation operation with a Start trigger configured, calling niHSDIO_Initiate causes the channels to go to their Initial states (refer to niHSDIO_ConfigureInitialState for more information on Initial states). + /// + ///This function is valid only for dynamic operations (acquisition or generation). It is not valid for static operations. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int Initiate() + { + int pInvokeResult = PInvoke.Initiate(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Call this function to pause execution of your program until the dynamic data operation is completed or the function returns a timeout error. niHSDIO_WaitUntilDone is a blocking function that periodically checks the operation status. It returns control to the calling program if the operation completes successfully or an error occurs (including a timeout error). + /// + ///This function is most useful for finite data operations that you expect to complete within a certain time. + /// + /// + /// + ///This parameter specifies the number of milliseconds to allow the function to complete before returning. If the specified time elapses before the data operation has completed, the function returns a timeout error. + /// + ///- Setting a value of 0 causes the function to return immediately. This setting can be useful to manually poll for hardware errors after a data operation has been initiated. If no other error has occurred and the data operation is still not complete, the function returns a timeout error. + /// + ///- Setting a value of -1 causes the function to never timeout. Be careful not to use this value during a continuous operation, as it will never return unless a HW error occurs. Perform a manual device reset from Measurement and Automation Explorer if you get stuck in this state or use niHSDIO_reset or niHSDIO_ResetDevice from the other session of the device. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WaitUntilDone(int Max_Time_Milliseconds) + { + int pInvokeResult = PInvoke.WaitUntilDone(this._handle, Max_Time_Milliseconds); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Stops a running dynamic session. This function is generally not required on finite data operations, as they complete on their own after the last data point is generated or acquired. This function is generally required for continuous operations or if you wish to interrupt a finite operation before it is completed. + /// + ///This function is valid for dynamic operations (acquisition or generation) only. It is not valid for static operations. + /// + ///NOTE: To avoid receiving hardware clocking errors when reconfiguring an external clock, explicitly call the niHSDIO_Abort function after your finite operation has completed before performing any clocking reconfiguration. An external clock that stops sending pulses to the device (even after a finite operation has completed) may cause NI-HSDIO to return an error, stating that the clock became unlocked, if the device has not implicitly aborted yet. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int Abort() + { + int pInvokeResult = PInvoke.Abort(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the acquisition size, including the number of acquired records and the minimum record size. + /// + /// + ///Sets the number of samples to be acquired per record. If you need pre- and post-trigger points, configure a Reference trigger and specify the number of pretrigger points. + /// + /// + ///Sets how many records are acquired. Currently this value must be set to 1. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureAcquisitionSize(int Samples_Per_Record, int Number_Of_Records) + { + int pInvokeResult = PInvoke.ConfigureAcquisitionSize(this._handle, Samples_Per_Record, Number_Of_Records); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Selects between acquiring high/low data or valid/invalid data during a static or dynamic acquisition operation. + /// + ///Select High or Low mode to get logic high or logic low values. Select Valid or Invalid mode to determine if the signal is within the specified voltage range (above data voltage low level but below data voltage high level) or outside the range (below data voltage low level or above data voltage high level). Refer to the Data Interpretation topic in the NI Digital Waveform Generator/Analyzer Help to understand how data is returned to you. + /// + ///NOTE: NI 654x/656x devices only support the High or Low mode of data interpretation. NI-HSDIO returns an error if you select Valid or Invalid mode for an acquisition with these devices. + /// + /// + ///Identifies channels to apply settings. Use "" or VI_NULL to specify all channels. + /// + /// + ///Selects the data interpretation mode. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_HIGH_OR_LOW - Data read represents logical values (logic high or logic low) + /// + ///- NIHSDIO_VAL_VALID_OR_INVALID - Data read represents whether channel data is within the specified voltage range. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDataInterpretation(string Channel_List, int Data_Interpretation) + { + int pInvokeResult = PInvoke.ConfigureDataInterpretation(this._handle, Channel_List, Data_Interpretation); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a waveform acquisition on channels enabled for dynamic acquisition, waits until it acquires the number of samples in Samples_To_Read, and returns the acquired binary data. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in Samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after Max_Time_Milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ReadWaveformU32(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, uint[] Data) + { + int pInvokeResult = PInvoke.ReadWaveformU32(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers acquired binary data from onboard memory to PC memory. The data was acquired to onboard memory previously by calling the niHSDIO_Initiate function. + /// + ///If the number of samples specified in Samples_To_Read is still not available after the number of milliseconds specified in Max_Time_Milliseconds, this function returns no data with a timeout error. + /// + ///The fetch position can be modified by using niHSDIO_SetAttributeViInt32 and the NIHSDIO_ATTR_FETCH_RELATIVE_TO or NIHSDIO_ATTR_FETCH_OFFSET attributes. The default value for NIHSDIO_ATTR_FETCH_RELATIVE_TO is NIHSDIO_VAL_CURRENT_READ_POSITION. The default value for NIHSDIO_ATTR_FETCH_OFFSET is 0. + /// + ///Calling this function is not necessary if you use the niHSDIO_ReadWaveformU32 function, as the fetch is performed as part of that function. + /// + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in Samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after max time milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int FetchWaveformU32(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, uint[] Data) + { + int pInvokeResult = PInvoke.FetchWaveformU32(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a waveform acquisition on channels enabled for dynamic acquisition, waits until it acquires the number of samples in Samples_To_Read, and returns the acquired binary data. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after Max_Time_Milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ReadWaveformU16(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, ushort[] Data) + { + int pInvokeResult = PInvoke.ReadWaveformU16(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers acquired binary data from onboard memory to PC memory. The data was acquired to onboard memory previously by calling the niHSDIO_Initiate function. + /// + ///If the number of samples specified in Samples_To_Read is still not available after the number of milliseconds specified in Max_Time_Milliseconds, this function returns no data with a timeout error. + /// + ///The fetch position can be modified by using niHSDIO_SetAttributeViInt32 and the NIHSDIO_ATTR_FETCH_RELATIVE_TO or NIHSDIO_ATTR_FETCH_OFFSET attributes. The default value for NIHSDIO_ATTR_FETCH_RELATIVE_TO is NIHSDIO_VAL_CURRENT_READ_POSITION. The default value for NIHSDIO_ATTR_FETCH_OFFSET is 0. + /// + ///Calling this function is not necessary if you use the niHSDIO_ReadWaveformU16 function, as the fetch is performed as part of that function. + /// + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in Samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after max time milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int FetchWaveformU16(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, ushort[] Data) + { + int pInvokeResult = PInvoke.FetchWaveformU16(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a waveform acquisition on channels enabled for dynamic acquisition, waits until it acquires the number of samples in Samples_To_Read, and returns the acquired binary data. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after Max_Time_Milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ReadWaveformU8(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, byte[] Data) + { + int pInvokeResult = PInvoke.ReadWaveformU8(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers acquired binary data from onboard memory to PC memory. The data was acquired to onboard memory previously by calling the niHSDIO_Initiate function. + /// + ///If the number of samples specified in Samples_To_Read is still not available after the number of milliseconds specified in Max_Time_Milliseconds, this function returns no data with a timeout error. + /// + ///The fetch position can be modified by using niHSDIO_SetAttributeViInt32 and the NIHSDIO_ATTR_FETCH_RELATIVE_TO or NIHSDIO_ATTR_FETCH_OFFSET attributes. The default value for NIHSDIO_ATTR_FETCH_RELATIVE_TO is NIHSDIO_VAL_CURRENT_READ_POSITION. The default value for NIHSDIO_ATTR_FETCH_OFFSET is 0. + /// + ///Calling this function is not necessary if you use the niHSDIO_ReadWaveformU8 function, as the fetch is performed as part of that function. + /// + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in Samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after max time milliseconds. A value of -1 causes the function to never time out. + /// + /// + /// + ///Returns the number of samples that were successfully fetched and transferred into data[]. + /// + /// + ///Returns the preallocated array where acquired samples are written. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int FetchWaveformU8(int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, byte[] Data) + { + int pInvokeResult = PInvoke.FetchWaveformU8(this._handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a multirecord acquisition and returns the acquired waveform as a two-dimensional array of unsigned 32-bit data. + /// + /// + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///The number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int ReadMultiRecordU32(int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Records_To_Read, uint[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.ReadMultiRecordU32(this._handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Fetches the data as a two-dimensional array of unsigned 32-bit integers and returns the number of samples read. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///Specifies the number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int FetchMultiRecordU32(int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Records_To_Read, uint[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.FetchMultiRecordU32(this._handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a multirecord acquisition, and returns the acquired waveform as a two-dimensional array of unsigned 16-bit data. + /// + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///Specifies the number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int ReadMultiRecordU16(int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Records_To_Read, ushort[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.ReadMultiRecordU16(this._handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Fetches the data as a two-dimensional array of unsigned 16-bit integers and returns the number of samples read. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///Specifies the number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int FetchMultiRecordU16(int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Records_To_Read, ushort[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.FetchMultiRecordU16(this._handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Initiates a multirecord acquisition, and returns the acquired waveform as a two-dimensional array of unsigned 8-bit data. + /// + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///Specifies the number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int ReadMultiRecordU8(int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Records_To_Read, byte[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.ReadMultiRecordU8(this._handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Fetches the data as a two-dimensional array of unsigned 8-bit integers and returns the number of samples read. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the first record you want to read. + /// + /// + ///Specifies the number of records you want to read. + /// + /// + ///Returns the array of waveform data that contains the records to read. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int FetchMultiRecordU8(int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Records_To_Read, byte[] Waveform_Data, nihsdio_wfminfo Waveform_Info) + { + int pInvokeResult = PInvoke.FetchMultiRecordU8(this._handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Records_To_Read, Waveform_Data, Waveform_Info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers acquired waveform data from device memory directly to PC memory allocated by a Direct DMA-compatible device. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + /// + ///Specifies the number of samples to fetch. + /// + /// + ///Specifies the size (in bytes) of the buffer in memory at which to transfer acquired data. + /// + /// + ///Specifies the location of the buffer in memory at which to transfer acquired data. + /// + /// + ///Returns information about the records. This parameter includes an absolute timestamp, relative timestamp, the number of samples acquired, and the dT of the waveform. + /// + /// + ///Returns the offset of the first sample acquired within the specified buffer. Data is transfered from device memory in 128 bytes increments, so the first sample of the acquired data typically occurs at some offset from the start of the buffer when using a Reference trigger. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int FetchWaveformDirectDMA(int Max_Time_Milliseconds, int Samples_To_Read, uint Buffer_Size, System.IntPtr Buffer_Address, nihsdio_wfminfo Waveform_Info, uint Offset_to_First_Sample) + { + int pInvokeResult = PInvoke.FetchWaveformDirectDMA(this._handle, Max_Time_Milliseconds, Samples_To_Read, Buffer_Size, Buffer_Address, Waveform_Info, Offset_to_First_Sample); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Returns the sample error information from a hardware comparison operation. + /// + /// + ///Specifies the number of sample errors to fetch. + /// + /// + ///Specifies in milliseconds how long to allow the function to complete before returning a timeout error. + /// + ///A value of 0 causes the function to return immediately with up to the number of samples specified in Samples_To_Read. If you set Max_Time_Milliseconds to a value other than 0, and timeout occurs before all the samples are acquired, you receive a timeout error. If you specify a value for Samples_To_Read that is greater than the number of samples in the device memory, NI-HSDIO returns the available samples after max time milliseconds. A value of -1 causes the function to never timeout. + /// + ///Default Value: 10000 + /// + /// + ///Returns the total number of sample errors read from device memory. + /// + /// + ///Returned array which indicates the number of samples with errors. + /// + /// + ///Returns the bit numbers of the data within the samples with errors. Please note, the sampleNumber[i] and errorBits[i] correspond to one another + /// + /// + /// + ///Returns the number of times that error was repeated. + /// + /// + ///Reserved filed. Use NULL. + /// + /// + ///Reserved filed. Use NULL. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int HWC_FetchSampleErrors(int Sample_Errors_to_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Error_Read, double[] Error_Sample_Numbers, uint[] Error_Bits, uint[] Error_Repeat_Counts, out uint Reserved_1, out uint Reserved_2) + { + int pInvokeResult = PInvoke.HWC_FetchSampleErrors(this._handle, Sample_Errors_to_Read, Max_Time_Milliseconds, out Number_Of_Samples_Error_Read, Error_Sample_Numbers, Error_Bits, Error_Repeat_Counts, out Reserved_1, out Reserved_2); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers waveform data from PC memory to onboard memory. Supported devices for this function depend on the data width for your device, not on the number of assigned dynamic channels. This function may be used when the data width is 4. + /// + ///If you specify a Waveform_Name not already allocated on the device, the appropriate amount of onboard memory is allocated (if available) and the data is stored in that new location. + /// + ///Data is always written to memory starting at the current write position of the waveform. A new waveform's write position is the start of the allocated memory. Calling niHSDIO_WriteNamedWaveformU32 moves the next write position to the end of the data just written. Thus, subsequent calls to niHSDIO_WriteNamedWaveformU32 append data to the end of previously written data. You may also manually change the write position by calling niHSDIO_SetNamedWaveformNextWritePosition. If you try to write past the end of the allocated space, NI-HSDIO returns an error. + /// + ///Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using niHSDIO_DeleteNamedWaveform and then recreate it with the new size using the same name. + /// + ///This function calls niHSDIO_CommitDynamic - all pending attributes are committed to hardware. + /// + ///When you explicitly call niHSDIO_AllocateNamedWaveform and write waveforms using multiple niHSDIO_WriteNamedWaveformU32 calls, each waveform block written must be a multiple of 32 samples for the NI 654x/655x devices or a multiple of 64 samples + ///for the NI 656x devices (128 samples if the NI 656x is in + ///DDR mode). + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the number of samples in data to be written to onboard memory. + /// + /// + /// + ///Specifies the waveform data. + /// + ///If you want to use direct DMA to write your waveform from onboard memory, pass the memory address (pointer value) of the region so that you write within the direct DMA window. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteNamedWaveformU32(string Waveform_Name, int Samples_To_Write, uint[] Data) + { + int pInvokeResult = PInvoke.WriteNamedWaveformU32(this._handle, Waveform_Name, Samples_To_Write, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers waveform data from PC memory to onboard memory. Supported devices for this function depend on the data width for your device, not on the number of assigned dynamic channels. This function may be used when the data width is 2. + /// + ///If you specify a waveformName not already allocated on the device, the appropriate amount of onboard memory is allocated (if available) and the data is stored in that new location. + /// + ///Data is always written to memory starting at the current write position of the waveform. A new waveform's write position is the start of the allocated memory. Calling this function moves the next write position to the end of the data just written. Thus, subsequent calls to this function append data to the end of previously written data. You may also manually change the write position by calling niHSDIO_SetNamedWaveformNextWritePosition. If you try to write past the end of the allocated space, NI-HSDIO returns an error. + /// + ///Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using niHSDIO_DeleteNamedWaveform and then recreate it with the new size using the same name. + /// + ///This function calls niHSDIO_CommitDynamic - all pending attributes are committed to hardware. + /// + ///When you explicitly call niHSDIO_AllocateNamedWaveform and write waveforms using multiple niHSDIO_WriteNamedWaveformU16 calls, each waveform block written must be a multiple of 32 samples for the NI 654X/655X devices or a multiple of 64 samples + ///for the NI 656X devices (128 samples if the NI 656X is in + ///DDR mode). + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the number of samples in data to be written to onboard memory. + /// + /// + /// + ///Specifies the waveform data. + /// + ///If you want to use direct DMA to write your waveform from onboard memory, pass the memory address (pointer value) of the region so that you write within the direct DMA window. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteNamedWaveformU16(string Waveform_Name, int Samples_To_Write, ushort[] Data) + { + int pInvokeResult = PInvoke.WriteNamedWaveformU16(this._handle, Waveform_Name, Samples_To_Write, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers waveform data from PC memory to onboard memory. Supported devices for this function depend on the data width for your device, not on the number of assigned dynamic channels. This function may be used when the data width is 1. + /// + ///If you specify a waveformName not already allocated on the device, the appropriate amount of onboard memory is allocated (if available) and the data is stored in that new location. + /// + ///Data is always written to memory starting at the current write position of the waveform. A new waveform's write position is the start of the allocated memory. Calling this function moves the next write position to the end of the data just written. Thus, subsequent calls to this function append data to the end of previously written data. You may also manually change the write position by calling niHSDIO_SetNamedWaveformNextWritePosition. If you try to write past the end of the allocated space, NI-HSDIO returns an error. + /// + ///Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using niHSDIO_DeleteNamedWaveform and then recreate it with the new size using the same name. + /// + ///This function calls niHSDIO_CommitDynamic - all pending attributes are committed to hardware. + /// + ///When you explicitly call niHSDIO_AllocateNamedWaveform and write waveforms using multiple niHSDIO_WriteNamedWaveformU8 calls, each waveform block written must be a multiple of 32 samples for the NI 654X/655X devices or a multiple of 64 samples + ///for the NI 656X devices (128 samples if the NI 656X is in + ///DDR mode). + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the number of samples in data to be written to onboard memory. + /// + /// + /// + ///Specifies the waveform data. + /// + ///If you want to use direct DMA to write your waveform from onboard memory, pass the memory address (pointer value) of the region so that you write within the direct DMA window. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteNamedWaveformU8(string Waveform_Name, int Samples_To_Write, byte[] Data) + { + int pInvokeResult = PInvoke.WriteNamedWaveformU8(this._handle, Waveform_Name, Samples_To_Write, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Transfers multistate digital waveforms from PC memory to onboard memory. Each element of data[] uses one byte per channel per sample. The supported values are defined in niHSDIO.h. + /// + ///If you specify a waveformName not already allocated on the device, the appropriate amount of onboard memory is allocated (if available), and the data is stored in that new location. + /// + ///Data is always written to memory starting at the current write position of the waveform. A new waveform's write position is the start of the allocated memory. Calling this function moves the next write position to the end of the data just written. Thus, subsequent calls to this function append data to the end of previously written data. You can manually change the write position by calling niHSDIO_SetNamedWaveformNextWritePosition. If you try to write past the end of the allocated space, NI-HSDIO returns an error. + /// + ///Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using niHSDIO_DeleteNamedWaveform and then recreate it with the new size using the same name. + /// + ///This function calls niHSDIO_CommitDynamic--all pending attributes are committed to hardware. + /// + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the number of samples in data to be written to onboard memory. This number is not equal to the length of the data[] array, since its size is the number of samples to write times the number of channels. + /// + /// + /// + ///Describes the layout of the waveform contained in data[]. + /// + ///Defined Values + /// + ///NIHSDIO_VAL_GROUP_BY_SAMPLE--specifies that consecutive samples in data[] are such that the array contains the first sample from every signal in the operation, then the second sample from every signal, up to the last sample from every signal. + /// + ///NIHSDIO_VAL_GROUP_BY_CHANNEL--specifies that consecutive samples in data[] are such that the array contains all the samples from the first signal in the operation, then all the samples from the second signal, up to all samples from the last signal. . + /// + /// + ///Specifies the digital waveform data. Each value on this array defines the state of one channel of one sample. Supported states are defined in niHSDIO.h. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteNamedWaveformWDT(string Waveform_Name, int Samples_To_Write, int Data_Layout, byte[] Data) + { + int pInvokeResult = PInvoke.WriteNamedWaveformWDT(this._handle, Waveform_Name, Samples_To_Write, Data_Layout, Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Reads and transfers data from a digital .hws file to onboard memory. + /// + ///If you specify a Waveform_Name not already allocated on the device, the appropriate amount of onboard memory is allocated (if available), and the data is stored in that new location. + /// + ///Data is always written to memory starting at the current write position of the waveform. A new waveform's write position is the start of the allocated memory. Calling this function moves the next write position to the end of the data just written. Thus, subsequent calls to this function append data to the end of previously written data. You can manually change the write position by calling niHSDIO_SetNamedWaveformNextWritePosition. If you try to write past the end of the allocated space, NI-HSDIO returns an error. + /// + ///Waveforms are stored contiguously in onboard memory. You cannot resize an existing named waveform. Instead, delete the existing waveform using niHSDIO_DeleteNamedWaveform and then recreate it with the new size using the same name. + /// + ///This function calls niHSDIO_CommitDynamic--all pending attributes are committed to hardware. + /// + /// + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the path and file name of the digital .hws file to open. The .hws extension is typically used for .hws files, although using this extension is optional. + /// + /// + ///Controls how the sample rate is computed. + /// + ///Setting this value to TRUE computes the generation rate from the WDT value. If the sample rate has been configured using niHSDIO_ConfigureSampleClock function, useRateFromWaveform overrides the sample rate. + /// + /// + ///Returns the number of samples contained in the waveform. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteNamedWaveformFromFileHWS(string Waveform_Name, string File_Path, bool Use_Rate_From_Waveform, out int Waveform_Size) + { + int pInvokeResult = PInvoke.WriteNamedWaveformFromFileHWS(this._handle, Waveform_Name, File_Path, System.Convert.ToUInt16(Use_Rate_From_Waveform), out Waveform_Size); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the idle state for a dynamic generation operation. The idle state may be active in a variety of conditions: + /// + ///- The generation operation completes normally. + ///- The generation operation pauses from an active Pause trigger. + ///- The generation operation terminates due to an underflow error. + /// + ///Valid Syntax: + /// + ///The order of channelList determines the order of the pattern string. For example, the following two examples are equivalent: + /// + ///niHSDIO_ConfigureIdleState(vi, "19-0", "0000 0XXX XX11 111Z ZZZZ"); + /// + ///niHSDIO_ConfigureIdleState(vi, "0-19", "ZZZZ Z111 11XX XXX0 0000"); + /// + ///Refer to Initial and Idle States in the NI Digital Waveform Generator/Analyzer Help for more information. + /// + /// + ///Specifies which channels will have their idle value set using the Idle_State string. The order of channels in Channel_List determines the order of Idle_State. + /// + /// + ///Describes the idle state of a dynamic generation operation. This expression is composed of characters: + /// + ///- 'X' or 'x': keeps the previous value + ///- '1': sets the channel to logic high + ///- '0': sets the channel to logic low + ///- 'Z' or 'z': disables the channel (sets it to high-impedance) + /// + ///The leftmost character in the expression corresponds to the first channel in Channel_List. The number of characters in pattern must equal the number of channels specified in Channel_List or an error is returned. + /// + ///The default state of a channel is to keep the previous value. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureIdleState(string Channel_List, string Idle_State) + { + int pInvokeResult = PInvoke.ConfigureIdleState(this._handle, Channel_List, Idle_State); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the idle state for a dynamic generation operation. The idle state may be active in a variety of conditions: + /// + ///- The generation operation completes normally + ///- The generation operation pauses from an active Pause trigger + ///- The generation operation terminates due to an underflow error + /// + ///Unlike niHSDIO_ConfigureIdleState, which uses a string, this function uses a binary format to represent only logic high and low. If you require more choices for your idle state, use the niHSDIO_ConfigureIdleState function. + /// + ///Refer to the Initial and Idle States topic in the NI Digital Waveform Generator/Analyzer Help for more information. + /// + /// + ///Bit mask representing the idle state. High is specified with a 1, and low is specified with a 0. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureIdleStateU32(uint Idle_State) + { + int pInvokeResult = PInvoke.ConfigureIdleStateU32(this._handle, Idle_State); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the initial state for a dynamic generation operation. The initial state of each channel is driven after the session is initiated using niHSDIO_Initiate. Channels remain unchanged until the first waveform sample is generated. + /// + ///The order of Channel_List determines the order of the pattern string. For example, the following two examples are equivalent: + /// + ///- niHSDIO_ConfigureInitialState (vi, "19-0", "0000 0XXX XX11 111Z ZZZZ"); + /// + ///- niHSDIO_ConfigureInitialState (vi, "0-19", "ZZZZ Z111 11XX XXX0 0000"); + /// + ///Refer to the Initial and Idle States topic in the NI Digital Waveform Generator/Analyzer Help for more information. + /// + /// + ///Specifies which channels will have their initial value set using the Initial_State string. The order of channels in the list determines the order of the Initial_State string. + /// + /// + ///This string expression describes the initial state of a dynamic generation operation. This expression is composed of characters: + /// + ///- 'X' or 'x': keeps the previous value + ///- '1': sets the channel to logic high + ///- '0': sets the channel to logic low + ///- 'Z' or 'z': disables the channel or sets it to high-impedance + /// + ///The leftmost character in the expression corresponds to the first channel in channelList. The number of characters in pattern must equal the number of channels specified in channelList or an error is returned. + /// + ///The default state of a channel is to keep the previous value. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureInitialState(string Channel_List, string Initial_State) + { + int pInvokeResult = PInvoke.ConfigureInitialState(this._handle, Channel_List, Initial_State); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the initial state for a dynamic generation operation. The initial state of each channel is driven after the session is initiated using niHSDIO_Initiate. Channels remain unchanged until the first waveform sample is generated. + /// + ///Unlike niHSDIO_ConfigureInitialState which uses a string, this function uses a binary format to represent only logic high and low. If you require more choices for your initial state, use the niHSDIO_ConfigureInitialState function. + /// + /// + /// + ///Bit mask representing the initial state. High is specified with a 1, and low is specified with a 0. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureInitialStateU32(uint Initial_State) + { + int pInvokeResult = PInvoke.ConfigureInitialStateU32(this._handle, Initial_State); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Specifies the number of times to generate a waveform or whether to generate it continuously. This function is only valid when the Generation_Mode parameter of niHSDIO_ConfigureGenerationMode is set to NIHSDIO_VAL_WAVEFORM. + /// + /// + ///Specifies the repeat mode to configure: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_FINITE - Calling niHSDIO_Initiate generates the named waveform a finite number of times. The number of times is specified by the Repeat_Count parameter. + /// + ///- NIHSDIO_VAL_CONTINUOUS - Calling niHSDIO_Initiate generates the named waveform continuously (until niHSDIO_Abort function is called). Repeat_Count is ignored. + /// + /// + /// + ///Specifies the number of times to generate the waveform. This parameter is ignored if Repeat_Mode is NIHSDIO_VAL_CONTINUOUS. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureGenerationRepeat(int Repeat_Mode, int Repeat_Count) + { + int pInvokeResult = PInvoke.ConfigureGenerationRepeat(this._handle, Repeat_Mode, Repeat_Count); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the waveform to be generated upon a call to niHSDIO_Initiate when NIHSDIO_ATTR_GENERATION_MODE equals NIHSDIO_VAL_WAVEFORM. This function need only be called if multiple waveforms are present in onboard memory (refer to NIHSDIO_ATTR_WAVEFORM_TO_GENERATE for more information). + /// + /// + ///Specifies which waveform to generate upon calling niHSDIO_Initiate. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureWaveformToGenerate(string Waveform_Name) + { + int pInvokeResult = PInvoke.ConfigureWaveformToGenerate(this._handle, Waveform_Name); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Reserves waveform space in onboard memory and associates a waveform name with it. Individual waveforms are stored contiguously in onboard memory. + /// + ///NOTES: + ///- niHSDIO_AllocateNamedWaveform sets aside onboard memory space and associates a string name with that space. The name given to the waveform is the same name used in the write named waveform functions, as well as the name used in scripts. + /// + ///- If not enough space is available to accommodate a waveform of size sizeInSamples, an error is returned and no memory space is created. + /// + ///- This function does not change any data on the device itself, but rather adds the named reference in software only. Use the write named waveform functions to fill the onboard memory with waveform data to be generated. + /// + /// + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies the number of samples to allocate for the named waveform. + /// + ///The number of bits in the allocated samples differs depending on the device you are using. Refer to your device documentation for more information. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int AllocateNamedWaveform(string Waveform_Name, int Size_In_Samples) + { + int pInvokeResult = PInvoke.AllocateNamedWaveform(this._handle, Waveform_Name, Size_In_Samples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Modifies where within a named waveform to next write data. Write Named Waveform functions always begins writing at the current write position. Existing data in the waveform is overwritten. + /// + ///The "position" and "offset" parameters are used together to determine where the next write position will be. The "position" parameter describes an absolute (NIHSDIO_VAL_START_OF_WAVEFORM) or relative (NIHSDIO_VAL_CURRENT_READ_POSITION) move. The "offset" is the number of samples to shift the next write position. You must always set the write position at a position that is a multiple of 32 samples for the NI 654x/655x devices or a multiple of 64 samples for the NI 656x devices (128 samples if the NI 656x is in DDR mode). + /// + ///Examples of combinations of "position" and "offset" + ///-Position: NIHSDIO_VAL_START_OF_WAVEFORM + ///-Offset: 0 + ///-Effect: Write location becomes the start of waveform + /// + ///-Position: NIHSDIO_VAL_START_OF_WAVEFORM + ///-Offset: 5 + ///-Effect: Write location becomes the sixth sample in waveform + /// + ///-Position: NIHSDIO_VAL_START_OF_WAVEFORM + ///-Offset: -1 + ///-Effect: ERROR-- The device would try to place the write position before start of waveform. + /// + ///-Position: NIHSDIO_VAL_CURRENT_READ_POSITION + ///-Offset: 0 + ///-Effect: No effect - leaves next write position unchanged + /// + ///-Position: NIHSDIO_VAL_CURRENT_POSITION + ///-Offset: 10 + ///-Effect: Shift write position 10 samples ahead from current write location. This position setting is only valid if the current write position plus this offset is in the waveform. + /// + ///-Position: NIHSDIO_VAL_CURRENT_POSITION + ///-Offset: -10 + ///-Effect: Shift write position 10 samples back from current location. This position setting is only valid if the current write position is greater than 10. + /// + ///The write position is moved to the end of the most recently written data after each call to a Write Named Waveform function. Thus you do not need to explicitly call niHSDIO_SetNamedWaveformNextWritePosition. + /// + ///Attempting to set the write position past the end of the allocated space results in an error. + /// + /// + /// + ///Specifies a string representing the name to associate with the allocated waveform memory. + /// + /// + ///Specifies where to place the write position (in conjunction with offset): + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_START_OF_WAVEFORM - Offset is relative to the beginning of the waveform. + ///- NIHSDIO_VAL_CURRENT_POSITION - Offset is relative to the current write position in the waveform. + /// + /// + /// + ///Specifies the write position of the name waveform in conjunction with the mode attribute. Offset is in samples. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int SetNamedWaveformNextWritePosition(string Waveform_Name, int Position, int Offset) + { + int pInvokeResult = PInvoke.SetNamedWaveformNextWritePosition(this._handle, Waveform_Name, Position, Offset); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Frees a named waveform space in onboard memory. + /// + ///NOTE: This function releases onboard memory space previously allocated by either the niHSDIO_AllocateNamedWaveform or niHSDIO_WriteNamedWaveform functions. Any future reference to the deleted waveform results in an error. However, previously written scripts that still reference the deleted waveform do not generate an error at initiation. + /// + ///An error is generated if the waveform name is not allocated in onboard memory. + /// + /// + /// + /// + ///Specifies the name of the waveform to delete. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DeleteNamedWaveform(string Waveform_Name) + { + int pInvokeResult = PInvoke.DeleteNamedWaveform(this._handle, Waveform_Name); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures whether to generate the waveform specified in NIHSDIO_ATTR_WAVEFORM_TO_GENERATE or the script specified in NIHSDIO_ATTR_SCRIPT_TO_GENERATE upon calling niHSDIO_Initiate. + /// + /// + ///Specifies the generation mode to configure. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_WAVEFORM - Calling niHSDIO_Initiate generates the named waveform represented by NIHSDIO_ATTR_WAVEFORM_TO_GENERATE. + ///- NIHSDIO_VAL_SCRIPTED - Calling niHSDIO_Initiate generates the script represented by NIHSDIO_ATTR_SCRIPT_TO_GENERATE. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureGenerationMode(int Generation_Mode) + { + int pInvokeResult = PInvoke.ConfigureGenerationMode(this._handle, Generation_Mode); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Writes a string containing scripts that governs the generation of waveforms. If this function is called repeatedly, previously written scripts with unique names remain loaded. Previously written scripts with identical names to those being written are replaced. + /// + ///If multiple scripts are loaded when niHSDIO_Initiate is called, then one of the scripts must be designated as the script to generate by setting NIHSDIO_ATTR_SCRIPT_TO_GENERATE to the desired script name. If only one script is in memory, then there is no need to designate the script to generate. All waveforms referenced in the scripts must be written before the script is written. + /// + ///An error is returned if the script uses incorrect syntax. This function calls niHSDIO_CommitDynamic. All pending attributes are committed to hardware. + /// + /// + ///Specifies a string containing a syntactically correct script. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteScript(string Script) + { + int pInvokeResult = PInvoke.WriteScript(this._handle, Script); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the script to be generated upon a call to the niHSDIO_Initiate function when NIHSDIO_ATTR_GENERATION_MODE is set to NIHSDIO_VAL_SCRIPTED. If there are multiple scripts loaded when niHSDIO_Initiate is called, one script must be designated as the script to generate or NI-HSDIO returns an error. You only need to call this function if multiple scripts are present in onboard memory (refer to NIHSDIO_ATTR_SCRIPT_TO_GENERATE for more information). + /// + /// + ///Specifies which script to generate after calling niHSDIO_Initiate. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureScriptToGenerate(string Script_Name) + { + int pInvokeResult = PInvoke.ConfigureScriptToGenerate(this._handle, Script_Name); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Sample clock. This function allows you to specify the clock source and rate for the Sample clock. + /// + ///If Clock_Source is set to NIHSDIO_VAL_ON_BOARD_CLOCK_STR, NI-HSDIO coerces the rate to a value that is supported by the hardware. Use niHSDIO_GetAttributeViReal64 to get the value for NIHSDIO_ATTR_SAMPLE_CLOCK_RATE to see to what value NI-HSDIO has coerced the Sample clock rate. + /// + ///Clock_Source can be set to NIHSDIO_VAL_STROBE_STR for acquisition only. + /// + /// + /// + ///Specifies the Sample clock source. Refer to NIHSDIO_ATTR_SAMPLE_CLOCK_SOURCE for details. + /// + ///Defined Values: + /// + ///-NIHSDIO_VAL_ON_BOARD_CLOCK_STR - The device uses the On Board Clock as the Sample clock source. + ///-NIHSDIO_VAL_STROBE_STR - The device uses the signal present on the STROBE channel as the Sample clock source. This choice is only valid for acquisition operations. + ///-NIHSDIO_VAL_CLK_IN_STR - The device uses the signal present on the front panel CLK IN SMB jack connector as the Sample clock source. + ///-NIHSDIO_VAL_PXI_STAR_STR - The device uses the signal present on the PXI_STAR line as the Sample clock source. This choice is valid for devices in slots that support PXI_STAR. + /// + /// + ///Specifies the Sample clock rate, expressed in Hz. You must set this property even when you supply an external clock because NI-HSDIO uses this property for a number of reasons, including optimal error checking and certain pulse width selections. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureSampleClock(string Clock_Source, double Clock_Rate) + { + int pInvokeResult = PInvoke.ConfigureSampleClock(this._handle, Clock_Source, Clock_Rate); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets up channels to be clocked in various ways by the sample clock edges. You have three options for data position: rising edge, falling edge, or delayed. + /// + /// + ///Identifies channels to apply settings. Use "" or VI_NULL to specify all channels. + /// + /// + ///Specifies which edge of the Sample clock signal is used to time the operation. You can also configure the device to generate data at a configurable delay past each rising edge of the Sample clock. + /// + ///Defined Values + /// + ///NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE - The device samples or generates data on the rising edge of the Sample clock. + ///NIHSDIO_VAL_SAMPLE_CLOCK_FALLING_EDGE - The device samples or generates data on the falling edge of the Sample clock. + ///NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE - The device samples or generates data with delay from rising edge of the Sample clock. Specify the delay using NIHSDIO_ATTR_DATA_POSITION_DELAY. + /// + ///NOTES: + /// + ///NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE has more jitter than the rising or falling edge values. + /// + ///Certain devices have sample clock frequency limitations when a custom delay is used. Refer to the device documentation for details. + /// + ///To configure a delay on NI 656x devices,you must delay all channels on the device. NI-HSDIO returns an error if you apply a delay to only a partial channel list. + /// + ///Default Value: NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDataPosition(string Channel_List, int Position) + { + int pInvokeResult = PInvoke.ConfigureDataPosition(this._handle, Channel_List, Position); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets up the data delay with respect to the Sample clock. + /// + ///NOTE: To configure a delay on NI 656x devices, you must delay all channels on the device. NI-HSDIO returns an error if you apply a delay to only a partial channel list. + /// + /// + ///Identifies channels to apply settings. Use "" or VI_NULL to specify all channels. + /// + /// + ///Specifies the delay after the Sample clock rising edge when the device generates or acquires a new data sample. Data delay is expressed as a fraction of the clock period, that is, a fraction of 1/NIHSDIO_ATTR_SAMPLE_CLOCK_RATE. All the channels in the session that use delayed Sample clock to position data must have the same delay value. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDataPositionDelay(string Channel_List, double Delay) + { + int pInvokeResult = PInvoke.ConfigureDataPositionDelay(this._handle, Channel_List, Delay); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Reference clock. Use this function when you are using the On Board Clock as a Sample clock, and you want the Sample clock to be phase-locked to a Reference signal. Phase-locking the Sample clock to a Reference clock prevents the Sample clock from "drifting" relative to the Reference clock. + /// + /// + ///Specifies the PLL reference clock source. Refer to NIHSDIO_ATTR_REF_CLOCK_SOURCE for details. + /// + ///Defined Values: + /// + ///-NIHSDIO_VAL_NONE_STR - The device will not use a Reference clock. + ///-NIHSDIO_VAL_CLK_IN_STR - The device uses the signal present on the front panel CLK IN SMB jack connector as the Reference clock source. + ///-NIHSDIO_VAL_PXI_CLK10_STR - The device uses the 10 MHz PXI backplane clock as the Reference clock source. This source is only available for PXI devices. + ///-NIHSDIO_VAL_RTSI7_STR - The device uses the signal on RTSI 7 as the Reference clock source. This source is only available for PCI devices. + /// + /// + ///Specifies the Reference clock rate, expressed in Hz. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_REF_CLOCK_RATE for details. + /// + ///Default Value: 10000000 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureRefClock(string Clock_Source, double Clock_Rate) + { + int pInvokeResult = PInvoke.ConfigureRefClock(this._handle, Clock_Source, Clock_Rate); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Delays the Sample clock relative to the Reference clock. Use this function to align the Sample clock of your device to the Sample clock of another device in your system. + /// + ///Only call this function after your session is committed. The effect of this function is immediate. + /// + ///This function generates an error if NIHSDIO_ATTR_REF_CLOCK_SOURCE is set to NIHSDIO_VAL_NONE_STR. + /// + ///This function can only align the device Sample clock to another Sample clock if the other device is using the same reference clock source. + /// + /// + /// + /// + ///Specifies the time in seconds to delay the Sample clock. Values range between 0 and the Sample clock period (1/NIHSDIO_ATTR_SAMPLE_CLOCK_RATE). + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int AdjustSampleClockRelativeDelay(double Adjustment_Time) + { + int pInvokeResult = PInvoke.AdjustSampleClockRelativeDelay(this._handle, Adjustment_Time); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Start trigger for edge triggering. + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_EDGE_START_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the edge to detect: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_RISING_EDGE - rising edge trigger + ///- NIHSDIO_VAL_FALLING_EDGE - falling edge trigger + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalEdgeStartTrigger(string Source, int Edge) + { + int pInvokeResult = PInvoke.ConfigureDigitalEdgeStartTrigger(this._handle, Source, Edge); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the start trigger for pattern match triggering. This function is only valid for acquisition operations. + /// + ///Valid Syntax: + /// + ///Both of these examples are valid and do the same thing. The order of channelList determines the order of the pattern string. + /// + ///- niHSDIO_ConfigurePatternMatchStartTrigger (vi, "19-0", "0000 0XXX XX11 1111 1111"); + /// + ///- niHSDIO_ConfigurePatternMatchStartTrigger (vi, "0-19", "1111 1111 11XX XXX0 0000"); + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + ///This string specifies which channels will be configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + ///This string expression describes the pattern to be matched. This expression is composed of characters: + /// + ///- 'X' or 'x': ignore the channel + ///- '1' : match on a logic 1 + ///- '0': match on a logic 0 + ///- 'R' or 'r': match on a rising edge + ///- 'F' or 'f': match on a falling edge + ///- 'E' or 'e': match on either edge + /// + ///The first character in the expression corresponds to the first channel in Channel_List. The number of characters in pattern must correspond to the number of channels specified in Channel_List. + /// + /// + /// + /// + ///Specifies the when the trigger asserts: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchStartTrigger(string Channel_List, string Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchStartTrigger(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Start trigger for pattern match triggering. + /// + ///Unlike niHSDIO_ConfigurePatternMatchStartTrigger which uses a string, this function uses a binary format to only represent high and low. If you require more choices for your pattern, use the niHSDIO_ConfigurePatternMatchStartTrigger function. + /// + ///This function is only valid for acquisition operations. + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + ///This string specifies which channels will be configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + /// + ///Specifies the binary pattern that activates the pattern match trigger under the conditions specified in Trigger_When. + /// + ///Bits on channels not specified in Channel_List are ignored. + /// + /// + /// + ///Specifies the when the trigger asserts: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchStartTriggerU32(string Channel_List, uint Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchStartTriggerU32(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Start trigger for software triggering. + /// + /// + ///Refer to niHSDIO_SendSoftwareEdgeTrigger for more information on using the software Start trigger. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureSoftwareStartTrigger() + { + int pInvokeResult = PInvoke.ConfigureSoftwareStartTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the device to not wait for a Start trigger after the niHSDIO_Initiate function is called. Calling this function is only necessary if you have configured a Start trigger and now want to disable it. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DisableStartTrigger() + { + int pInvokeResult = PInvoke.DisableStartTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Reference trigger for edge triggering in an acquisition. If the Reference trigger asserts before all of the pretrigger samples are acquired, then it is ignored. This function is only valid for acquisition operations. + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_EDGE_REF_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the edge to detect. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_RISING_EDGE - rising edge trigger + ///- NIHSDIO_VAL_FALLING_EDGE - falling edge trigger + /// + /// + /// + ///Specifies the number of necessary pretrigger samples before the Reference trigger is acknowledged. + /// + ///Default Value: 500 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalEdgeRefTrigger(string Source, int Edge, int Pretrigger_Samples) + { + int pInvokeResult = PInvoke.ConfigureDigitalEdgeRefTrigger(this._handle, Source, Edge, Pretrigger_Samples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Reference trigger for pattern match triggering. If the reference trigger asserts before all of the pretrigger samples are acquired, then it is ignored. This function is only valid for acquisition sessions. + /// + ///Valid Syntax: + /// + ///Both of these examples are valid and do the same thing. The order of channelList determines the order of the pattern string. + /// + ///- niHSDIO_ConfigurePatternMatchRefTrigger (vi, "19-0", "0000 0XXX XX11 111Z ZZZZ"); + /// + ///- niHSDIO_ConfigurePatternMatchRefTrigger (vi, "0-19", "ZZZZ Z111 11XX XXX0 0000"); + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + /// + ///This string specifies which channels are configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + ///This string expression describes the pattern to be matched. This expression is composed of characters: + /// + ///- 'X' or 'x': ignore the channel + ///- '1': match on a logic 1 + ///- '0': match on a logic 0 + ///- 'R' or 'r': match on a rising edge + ///- 'F' or 'f': match on a falling edge + ///- 'E' or 'e': match on either edge + /// + ///The leftmost character in the expression corresponds to the first channel in channelList. The number of characters in pattern must correspond to the number of channels specified in channelList or an error is returned. + /// + /// + /// + /// + ///Specifies the when the trigger asserts. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Specifies the number of necessary pretrigger samples before the reference trigger is acknowledged. + /// + ///Default Value: 500 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchRefTrigger(string Channel_List, string Pattern, int Trigger_When, int Pretrigger_Samples) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchRefTrigger(this._handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Reference trigger for pattern match triggering. If the reference trigger asserts before all of the pretrigger samples are acquired, then it is ignored. + /// + ///Unlike niHSDIO_ConfigurePatternMatchRefTrigger which uses a string, this function uses a binary format to only represent high and low. If you require more choices for your pattern, use the niHSDIO_ConfigurePatternMatchRefTrigger function. + /// + ///This function is only valid for acquisition sessions. + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + /// + ///This string specifies which channels are configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + ///Specifies the binary pattern that activates the pattern match trigger under the conditions specified in Trigger_When. + /// + ///Bits on channels not specified in Channel_List are ignored. + /// + /// + ///Specifies the when the trigger asserts. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Specifies the number of necessary pretrigger samples before the reference trigger is acknowledged. + /// + ///Default Value: 500 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchRefTriggerU32(string Channel_List, uint Pattern, int Trigger_When, int Pretrigger_Samples) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchRefTriggerU32(this._handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the reference trigger for software triggering. If the reference trigger asserts before all of the pretrigger samples are acquired, then it is ignored. This function is valid only for acquisition sessions. + /// + ///Refer to niHSDIO_SendSoftwareEdgeTrigger for more information on the software reference trigger. + /// + /// + ///Specifies the number of necessary pretrigger samples before the reference trigger is acknowledged. + /// + ///Default Value: 500 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureSoftwareRefTrigger(int Pretrigger_Samples) + { + int pInvokeResult = PInvoke.ConfigureSoftwareRefTrigger(this._handle, Pretrigger_Samples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the acquisition operation to have no Reference trigger. Calling this function is only necessary if you have configured a Reference trigger and now want to disable it. This function is valid only for acquisition sessions. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DisableRefTrigger() + { + int pInvokeResult = PInvoke.DisableRefTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Advance trigger for edge triggering in an acquisition. + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_EDGE_ADVANCE_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the edge to detect. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_RISING_EDGE - rising edge trigger + ///- NIHSDIO_VAL_FALLING_EDGE - falling edge trigger + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalEdgeAdvanceTrigger(string Source, int Edge) + { + int pInvokeResult = PInvoke.ConfigureDigitalEdgeAdvanceTrigger(this._handle, Source, Edge); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Advance trigger for pattern match triggering. This function is only valid for acquisition operations. + /// + ///Valid Syntax: + /// + ///Both of these examples are valid and do the same thing. The order of channelList determines the order of the pattern string. + /// + ///- niHSDIO_ConfigurePatternMatchAdvanceTrigger (vi, "19-0", "0000 0XXX XX11 1111 1111"); + /// + ///- niHSDIO_ConfigurePatternMatchAdvanceTrigger (vi, "0-19", "1111 1111 11XX XXX0 0000"); + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + ///This string specifies which channels will be configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + ///This string expression describes the pattern to be matched. This expression is composed of characters: + /// + ///- 'X' or 'x': ignore the channel + ///- '1' : match on a logic 1 + ///- '0': match on a logic 0 + ///- 'R' or 'r': match on a rising edge + ///- 'F' or 'f': match on a falling edge + ///- 'E' or 'e': match on either edge + /// + ///The first character in the expression corresponds to the first channel in Channel_List. The number of characters in pattern must correspond to the number of channels specified in Channel_List. + /// + /// + /// + /// + ///Specifies the when the trigger asserts: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchAdvanceTrigger(string Channel_List, string Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchAdvanceTrigger(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Advance trigger for pattern match triggering. This function is only valid for acquisition operations. + /// + ///Unlike niHSDIO_ConfigurePatternMatchAdvanceTrigger which uses a string, this function uses a binary format to only represent high and low. If you require more choices for your pattern, use the niHSDIO_ConfigurePatternMatchAdvanceTrigger function. + /// + /// + ///NOTE: The logic levels seen by pattern matching are affected by data interpretation. + /// + /// + ///This string specifies which channels will be configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. + /// + /// + ///Specifies the binary pattern that activates the pattern match trigger under the conditions specified in Trigger_When. + /// + ///Bits on channels not specified in Channel_List are ignored. + /// + /// + /// + ///Specifies the when the trigger asserts: + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchAdvanceTriggerU32(string Channel_List, uint Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchAdvanceTriggerU32(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Advance trigger for software triggering. + /// + /// + ///Refer to niHSDIO_SendSoftwareEdgeTrigger for more information on using the software Advance trigger. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureSoftwareAdvanceTrigger() + { + int pInvokeResult = PInvoke.ConfigureSoftwareAdvanceTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the acquisition operation to have no Advance trigger. Calling this function is only necessary if you have configured a Advance trigger and now want to disable it. This function is valid only for acquisition sessions. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DisableAdvanceTrigger() + { + int pInvokeResult = PInvoke.DisableAdvanceTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Script trigger for edge triggering. This function is only valid for generation sessions that use scripting. + /// + /// + ///Identifies which Script trigger this function configures. + /// + ///Defined Values: + /// + ///NIHSDIO_VAL_SCRIPT_TRIGGER0 + ///NIHSDIO_VAL_SCRIPT_TRIGGER1 + ///NIHSDIO_VAL_SCRIPT_TRIGGER2 + ///NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_EDGE_SCRIPT_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the edge to detect. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_RISING_EDGE - rising edge trigger + ///- NIHSDIO_VAL_FALLING_EDGE - falling edge trigger + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalEdgeScriptTrigger(string Trigger_ID, string Source, int Edge) + { + int pInvokeResult = PInvoke.ConfigureDigitalEdgeScriptTrigger(this._handle, Trigger_ID, Source, Edge); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Script trigger for level triggering. This function is only valid for generation sessions that use scripting. + /// + /// + /// + ///Identifies which script trigger this function configures. + /// + ///Defined Values: + /// + ///NIHSDIO_VAL_SCRIPT_TRIGGER0 + ///NIHSDIO_VAL_SCRIPT_TRIGGER1 + ///NIHSDIO_VAL_SCRIPT_TRIGGER2 + ///NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_LEVEL_SCRIPT_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the active level for the desired trigger. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_HIGH - trigger is active while its source is high + /// + ///- NIHSDIO_VAL_LOW - trigger is active while its source is low + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalLevelScriptTrigger(string Trigger_ID, string Source, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigureDigitalLevelScriptTrigger(this._handle, Trigger_ID, Source, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the Script trigger for software triggering. This function is only valid for generation sessions that use scripting. + /// + /// + /// + ///Identifies which script trigger this function configures. + /// + ///Defined Values: + /// + ///NIHSDIO_VAL_SCRIPT_TRIGGER0 + ///NIHSDIO_VAL_SCRIPT_TRIGGER1 + ///NIHSDIO_VAL_SCRIPT_TRIGGER2 + ///NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureSoftwareScriptTrigger(string Trigger_ID) + { + int pInvokeResult = PInvoke.ConfigureSoftwareScriptTrigger(this._handle, Trigger_ID); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the data operation to not have a Script trigger. Calling this function is only necessary if you have configured a particular Script trigger and now want to disable it. This function is only valid for generation sessions. + /// + /// + /// + /// + /// + /// + ///Identifies which Script trigger this function will configure. + /// + ///Defined Values: + /// + ///NIHSDIO_VAL_SCRIPT_TRIGGER0 + ///NIHSDIO_VAL_SCRIPT_TRIGGER1 + ///NIHSDIO_VAL_SCRIPT_TRIGGER2 + ///NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DisableScriptTrigger(string Trigger_ID) + { + int pInvokeResult = PInvoke.DisableScriptTrigger(this._handle, Trigger_ID); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the pause trigger for level triggering. + /// + /// + /// + ///You may specify any valid source terminal for this trigger. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + ///Defined Values: + /// + ///Refer to NIHSDIO_ATTR_DIGITAL_LEVEL_PAUSE_TRIGGER_SOURCE for possible values. + /// + /// + ///Specifies the active level for the desired trigger. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_HIGH - trigger is active while its source is high + ///- NIHSDIO_VAL_LOW - trigger is active while its source is low + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigureDigitalLevelPauseTrigger(string Source, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigureDigitalLevelPauseTrigger(this._handle, Source, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the pause trigger for pattern match triggering. This function is valid only for acquisition sessions. + /// + ///Valid Syntax: + /// + ///Both of these examples are valid and do the same thing. The order of channelList determines the order of the pattern string. + /// + ///- niHSDIO_ConfigurePatternMatchPauseTrigger (vi, "19-0", "0000 0XXX XX11 1111 1111"); + /// + ///- niHSDIO_ConfigurePatternMatchPauseTrigger (vi, "0-19", "1111 1111 11XX XXX0 0000"); + /// + ///NOTE: The values seen by pattern matching is affected by data interpretation. + /// + /// + /// + ///This string specifies which channels are configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. Ex. "0-19" and "19-0" are reverse of one another. + /// + /// + ///This string expression describes the pattern to be matched. This expression is composed of characters: + /// + ///- 'X' or 'x': ignore the channel + ///- '1': match on a logic 1 + ///- '0': match on a logic 0 + ///- 'R' or 'r': match on a rising edge + ///- 'F' or 'f': match on a falling edge + ///- 'E' or 'e': match on either edge + /// + ///The leftmost character in the expression corresponds to the first channel in channelList. The number of characters in pattern must correspond to the number of channels specified in channelList or an error is returned. + /// + /// + /// + ///Specifies the when the trigger asserts. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchPauseTrigger(string Channel_List, string Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchPauseTrigger(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Configures the pause trigger for pattern match triggering. This function is valid only for acquisition sessions. + /// + ///Unlike niHSDIO_ConfigurePatternMatchPauseTrigger which uses a string, this function uses a binary format to only represent high and low. If you require more choices for your pattern, use the niHSDIO_ConfigurePatternMatchPauseTrigger function. + /// + ///NOTE: The values seen by pattern matching is affected by data interpretation. + /// + /// + /// + ///This string specifies which channels are configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. Ex. "0-19" and "19-0" are reverse of one another. + /// + /// + ///Specifies the binary pattern that activates the pattern match trigger under the conditions specified in Trigger_When. + /// + ///Bits on channels not specified in Channel_List are ignored. + /// + /// + ///Specifies the when the trigger asserts. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PATTERN_MATCHES - the trigger activates when the pattern matches + /// + ///- NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH - the trigger activates when the pattern does not match + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ConfigurePatternMatchPauseTriggerU32(string Channel_List, uint Pattern, int Trigger_When) + { + int pInvokeResult = PInvoke.ConfigurePatternMatchPauseTriggerU32(this._handle, Channel_List, Pattern, Trigger_When); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Sets the data operation to have no Pause trigger. Calling this function is only necessary if you have configured a Pause trigger and now want to disable it. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int DisablePauseTrigger() + { + int pInvokeResult = PInvoke.DisablePauseTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Use this function to force a particular edge-based trigger to occur. This function applies to the Start, Reference, Advance, and Script triggers, and is valid if the particular trigger is configured for edge, pattern match, or software triggering (for edge or pattern match triggers you can use niHSDIO_SendSoftwareEdgeTrigger as a software override). + /// + /// + ///The trigger to assert. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_START_TRIGGER - Start trigger for dynamic acquisition or generation + /// + ///- NIHSDIO_VAL_REF_TRIGGER - Reference trigger for dynamic acqusition + /// + ///- NIHSDIO_VAL_SCRIPT_TRIGGER - Script trigger for dynamic generation + /// + /// + /// + /// + ///Describes the software trigger. For example, NIHSDIO_VAL_SCRIPT_TRIGGER0 could be the identifier for the Script trigger, or you could have an empty string for the Start and Reference triggers. + /// + /// - NIHSDIO_VAL_SCRIPT_TRIGGER0 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER1 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER2 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// - "" (empty string) or VI_NULL + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int SendSoftwareEdgeTrigger(int Trigger, string Trigger_Identifier) + { + int pInvokeResult = PInvoke.SendSoftwareEdgeTrigger(this._handle, Trigger, Trigger_Identifier); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Use this function to route signals (clocks, triggers, and events) to the output terminal you specify. Refer to your device documentation for valid signal destinations. + /// + ///Any routes created within a session persist after the session closes to prevent signal glitching. To unconfigure signal routes created in previous sessions, set the Reset_Instrument parameter in niHSDIO_InitGenerationSession or niHSDIO_InitAcquisitionSession to VI_TRUE or use niHSDIO_reset. + /// + ///If you export a signal with this function and commit the session, the signal is routed to the output terminal you specify. If you then reconfigure the signal to have a different output terminal, the previous output terminal is tristated after the session is committed. If you change the output terminal to NIHSDIO_VAL_DO_NOT_EXPORT_STR or an empty string when you commit the operation, the previous output terminal is tristated. + /// + /// + ///Signal (clock, trigger, or event) to export. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_SAMPLE_CLOCK + ///- NIHSDIO_VAL_REF_CLOCK + ///- NIHSDIO_VAL_START_TRIGGER + ///- NIHSDIO_VAL_REF_TRIGGER (dynamic acquisition only) + ///- NIHSDIO_VAL_ADVANCE_TRIGGER (dynamic acquisition only) + ///- NIHSDIO_VAL_DATA_ACTIVE_EVENT (dynamic generation only) + ///- NIHSDIO_VAL_READY_FOR_START_EVENT + ///- NIHSDIO_VAL_READY_FOR_ADVANCE_EVENT (dynamic acquisition only) + ///- NIHSDIO_VAL_END_OF_RECORD_EVENT (dynamic acquisition only) + ///- NIHSDIO_VAL_PAUSE_TRIGGER (dynamic generation only) + ///- NIHSDIO_VAL_SCRIPT_TRIGGER (dynamic generation only - requires Signal_Identifier to describe a particular Script trigger) + ///- NIHSDIO_VAL_MARKER_EVENT (dynamic generation only - requires Signal_Identifier to describe a particular Marker) + ///- NIHSDIO_VAL_ONBOARD_REF_CLOCK PCI devices only) - Calling this function with Signal set to this value sets the + ///NIHSDIO_ATTR_EXPORTED_ONBOARD_REF_CLOCK_OUTPUT_TERMINAL attribute + /// + /// + /// + ///Describes the signal being exported. + /// + ///Defined Values: + /// + /// - NIHSDIO_VAL_SCRIPT_TRIGGER0 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER1 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER2 + /// - NIHSDIO_VAL_SCRIPT_TRIGGER3 + /// - NIHSDIO_VAL_MARKER_EVENT0 + /// - NIHSDIO_VAL_MARKER_EVENT1 + /// - NIHSDIO_VAL_MARKER_EVENT2 + /// - NIHSDIO_VAL_MARKER_EVENT3 + /// - "" (empty String) or VI_NULL + /// + /// + /// + ///Output terminal where the signal is exported. + /// + ///Defined Values: + /// + ///- NIHSDIO_VAL_PFI0_STR - NIHSDIO_VAL_PFI3_STR : PFI connectors + ///- NIHSDIO_VAL_PXI_TRIG0_STR - NIHSDIO_VAL_PXI_TRIG7_STR : the PXI trigger backplane + ///- NIHSDIO_VAL_CLK_OUT_STR - CLK OUT coaxial connector on the front panel + ///- NIHSDIO_VAL_DDC_CLK_OUT_STR - DDC CLK OUT terminal in the Digital Data and Control Connector + ///- "" (empty string) or VI_NULL - the signal is not exported + /// + ///Trigger and event voltages and positions are only relevant if the destination of the event is one of the front panel connectors. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ExportSignal(int Signal, string Signal_Identifier, string Output_Terminal) + { + int pInvokeResult = PInvoke.ExportSignal(this._handle, Signal, Signal_Identifier, Output_Terminal); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Use this function to configure channels for static acquisition (if vi is an acquisition session) or static generation (if vi is a generation session). A channel cannot be simultaneously assigned to a static generation and dynamic generation. + /// + /// + ///This string identifies which channels will be configured as static. + /// + ///Valid Syntax: "0-19" or "0-15,16-19" or "0-18,19" + /// + ///Special values: + ///- "" (empty string) - configure ALL channels for static + ///- "None" - unconfigure all static channels + /// + ///Channels cannot be configured for both static generation and dynamic generation. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int AssignStaticChannels(string Channel_List) + { + int pInvokeResult = PInvoke.AssignStaticChannels(this._handle, Channel_List); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///This function immediately reads the digital value on channels configured for static acquisition. Configure a channel for static acquisition using the niHSDIO_AssignStaticChannels function. Channels not configured for static acquisition return a zero. + /// + ///Values obtained from static read operations are affected by data interpretation. + /// + /// + /// + ///Bit-value of data read from channels configured for static acquisition. + /// + ///The least significant bit of readData corresponds to the lowest physical channel number (for example, readData of 0x00F0 means channels 4-7 are logic one, while the remaining channels are logic zero or are not configured for static acquisition). + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ReadStaticU32(out uint Read_Data) + { + int pInvokeResult = PInvoke.ReadStaticU32(this._handle, out Read_Data); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///This function writes to channels configured for static generation. You can configure a channel for static generation using the niHSDIO_AssignStaticChannels function. + /// + /// + ///Bit-value of data to drive on channels configured for static generation. 1 corresponds to logic high, 0 corresponds to logic low. + /// + ///The least significant bit of writeData corresponds to the lowest physical channel number (for example, writeData of 0xFF00 means set the lower 8 channels to 0, while setting the upper 8 channels to logic high. + /// + ///Data values in writeData corresponding to channels not configured for static generation are ignored. + /// + ///Static channels explicitly disabled with the niHSDIO_TristateChannels function remain disabled, but the channel data value changes internally. Re-enabling a channel with niHSDIO_TristateChannels causes the channel to drive any value that you have written to it, even while the channel was disabled. + /// + /// + /// + ///Bit-value of channels to leave unchanged. 1 means to change the channel to whatever is reflected by writeData. 0 means do not alter the channel, regardless of writeData. + /// + ///The least significant bit of channelMask corresponds to the lowest physical channel number (e.g. writeData of 0xFFFF and channelMask of 0x0080 means set only channel 7 to 1; all other channels remain unchanged). + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int WriteStaticU32(uint Write_Data, uint Channel_Mask) + { + int pInvokeResult = PInvoke.WriteStaticU32(this._handle, Write_Data, Channel_Mask); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + /// + public int STPMU_SourceVoltage(string channelList, double voltageLevel, int sense, double currentRange) + { + int pInvokeResult = PInvoke.STPMU_SourceVoltage(this._handle, channelList, voltageLevel, sense, currentRange); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + /// + /// + public int STPMU_SourceCurrent(string channelList, double currentLevel, double currentLevelRange, double lowerVoltageLimit, double upperVoltageLimit) + { + int pInvokeResult = PInvoke.STPMU_SourceCurrent(this._handle, channelList, currentLevel, currentLevelRange, lowerVoltageLimit, upperVoltageLimit); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int STPMU_DisablePMU(string channelList, int returnState) + { + int pInvokeResult = PInvoke.STPMU_DisablePMU(this._handle, channelList, returnState); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + /// + /// + public int STPMU_MeasureVoltage(string channelList, double apertureTime__4_us_, int sense, double[] measurements, out int numberOfMeasurements) + { + int pInvokeResult = PInvoke.STPMU_MeasureVoltage(this._handle, channelList, apertureTime__4_us_, sense, measurements, out numberOfMeasurements); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + /// + public int STPMU_MeasureCurrent(string channelList, double aperture_time__4_us_, double[] measurements, out int numberOfMeasurements) + { + int pInvokeResult = PInvoke.STPMU_MeasureCurrent(this._handle, channelList, aperture_time__4_us_, measurements, out numberOfMeasurements); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + public int STPMU_ExternalForceControl(string channelList, int action, int connector) + { + int pInvokeResult = PInvoke.STPMU_ExternalForceControl(this._handle, channelList, action, connector); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + /// + public int STPMU_ExternalSenseControl(string channel, int action, int connector) + { + int pInvokeResult = PInvoke.STPMU_ExternalSenseControl(this._handle, channel, action, connector); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + public int SelfCal() + { + int pInvokeResult = PInvoke.SelfCal(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Changes the password that is required to initialize an external calibration session. The password may be up to four characters long. + /// + ///You can call this function from an acquisition, generation, or calibration session. + /// + /// + /// + ///The old (current) external calibration password. + /// + /// + ///The new (desired) external calibration password. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int ChangeExtCalPassword(string Old_Password, string New_Password) + { + int pInvokeResult = PInvoke.ChangeExtCalPassword(this._handle, Old_Password, New_Password); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Adjusts the voltage of the selected channel(s). The only errors that can be returned are actual calibration process errors. + /// + ///NOTES: This function is not supported for the NI 654X/656X devices. + /// + ///This function runs a static loopback test before adjusting the voltage. You must disconnect the cable from your device to run this function. + /// + /// + /// + ///Identifies channels on which voltage will be adjusted. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int CalAdjustChannelVoltage(string Channel) + { + int pInvokeResult = PInvoke.CalAdjustChannelVoltage(this._handle, Channel); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Closes an NI-HSDIO external calibration session and, if specified, stores the new calibration constants and calibration data in the onboard EEPROM. + /// + ///NOTE: Whether you commit or cancel, the device is reset and the FPGA is reloaded afterwards. + /// + /// + /// + ///The action to perform upon closing. + /// + ///Defined Values: + /// + ///NIHSDIO_VAL_EXT_CAL_COMMIT (62) - The new calibration constants and data determined during the external calibration session are stored in the onboard EEPROM, given that the calibration was complete and passed successfully. + ///NIHSDIO_VAL_EXT_CAL_CANCEL (63) - No changes are made to the calibration constants and data in the EEPROM. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + public int CloseExtCal(int Action) + { + int pInvokeResult = PInvoke.CloseExtCal(this._handle, Action); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///This function performs a self-test on the device and returns the test results. The self-test function performs a simple series of tests that ensure the device is powered up and responding. Complete functional testing and calibration are not performed by this function. + /// + ///This function is internal and does not affect external I/O connections or connections between devices. + /// + /// + /// + /// + ///This control contains the value returned from the device self-test. + /// + ///Self-test Code Description: + ///0 - Self-test passed + ///Anything else - Self-test failed + /// + /// + /// + /// + ///Returns the self-test response string from the device; you must pass a ViChar array at least IVI_MAX_MESSAGE_BUF_SIZE bytes in length + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int self_test(out short Self_Test_Result, System.Text.StringBuilder Self_Test_Message) + { + int pInvokeResult = PInvoke.self_test(this._handle, out Self_Test_Result, Self_Test_Message); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Call this function to check the hardware to determine if your dynamic data operation has completed. You can also use this function for continuous dynamic data operations to poll for error conditions. + /// + /// + /// + ///VI_TRUE is returned if the data operation is complete or an error has occurred. + /// + ///VI_FALSE is returned if the data operation has not completed. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int IsDone(out bool Done) + { + ushort DoneAsUShort; + int pInvokeResult = PInvoke.IsDone(this._handle, out DoneAsUShort); + Done = System.Convert.ToBoolean(DoneAsUShort); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Use this function to force a channel into a high-impedance state. The effect is immediate - it does not require the session be committed. The channel will remain tristated regardless of what other software commands are called. Call this function again and pass VI_FALSE into the Tristate parameter to allow other software commands to control the channel normally. + /// + ///Channels are kept in a high-impedance state while the session remains open. Closing the session does not affect the high-impedance state of the channel, but future sessions can now control it. + /// + /// + /// + /// + ///This string identifies which channels will be tristated. Channels not specified in this list are unaffected. + /// + ///Syntax examples: "2-15" or "0-3, 5, 8-15" or "0, 3, 10" + /// + /// + /// + /// + ///Defined Values: + /// + ///VI_TRUE: Force the channels specified in Channel_List to remain tristated, ignoring future software commands. + /// + ///VI_FALSE: Allow the channels specified in Channel_List to be untristated by future software commands. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int TristateChannels(string Channel_List, bool Tristate) + { + int pInvokeResult = PInvoke.TristateChannels(this._handle, Channel_List, System.Convert.ToUInt16(Tristate)); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Programs the hardware for the dynamic data operation using the attributes you select. Before entering the committed state, most attribute values are stored in software only; these values have not yet been programmed to the hardware. Once the session is committed, the hardware is configured. + /// + ///For many operations it is not necessary to explicitly call this function because the following functions implicitly commit: + ///niHSDIO_Initiate + ///niHSDIO_ReadWaveformU32 + ///niHSDIO_WriteNamedWaveformU32 + ///niHSDIO_WriteScript + /// + ///Start the operation with niHSDIO_Initiate. Running this function while a dynamic operation is in progress returns an error. Committing only programs attributes changed since previous commits. + /// + ///NOTE: Committing some attributes may have immediate effects seen on external instrument connectors. Voltage levels are an example of an attribute with an immediate effect when committed. + /// + ///Before committing a session that requires an external clock, ensure the external clock is available. Otherwise you receive an error that the device could not find or lock to the external clock. + /// + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int CommitDynamic() + { + int pInvokeResult = PInvoke.CommitDynamic(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Programs the hardware for the static data operation using the attributes you select. Before entering the committed state, most attribute values are stored in software only; these values have not yet been programmed to the hardware. Once the session is committed, the hardware is configured. + /// + ///For most static operations it is not necessary to explicitly call niHSDIO_CommitStatic because the following functions implicitly commit: + ///niHSDIO_ReadStaticU32 + ///niHSDIO_WriteStaticU32 + /// + ///Committing only programs attributes changed since previous commits. + /// + ///NOTE: Committing some attributes may have immediate effects seen on external instrument connectors. Voltage levels are an example of an attribute with an immediate effect when committed. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int CommitStatic() + { + int pInvokeResult = PInvoke.CommitStatic(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Call this function to reset the session to its initial state. All channels and front panel terminals are put into a high-impedance state. All software attributes are reset to their initial values. + /// + ///During a reset, routes of signals between this and other devices are released, regardless of which device created the route. For instance, a trigger signal being exported to a PXI Trigger line and used by another device will no longer be exported. + /// + ///niHSDIO_reset is applied to the ENTIRE device. If you have both a generation and an acquisition session active, the niHSDIO_reset resets the current session, including attributes, and invalidates the other session if it is committed or running. The other session must be closed. + /// + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int reset() + { + int pInvokeResult = PInvoke.reset(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + ///Call this function to reset the device to its initial state and reload its FPGA. All channels and front panel terminals are put into a high-impedance state. All software attributes are reset to their initial values. The entire contents of the FPGA and EEPROM files are reloaded. Use this function to re-enable your device if it has disabled itself because the device temperature has risen above its optimal operating temperature. + /// + ///During a device reset, routes of signals between this and other devices are released, regardless of which device created the route. For instance, a trigger signal being exported to a PXI Trigger line and used by another device will no longer be exported. + /// + ///niHSDIO_ResetDevice is applied to the ENTIRE device. If you have both a generation and an acquisition session active, the niHSDIO_ResetDevice resets the current session, including attributes, and invalidates the other session if it is committed or running. The other session must be closed. + /// + /// + ///Generally, calling niHSDIO_reset is acceptable instead of calling niHSDIO_ResetDevice. niHSDIO_reset executes more quickly. + /// + /// + ///Reports the status of this operation. To obtain a text description of the status code, call niHSDIO_error_message. To obtain additional information concerning the error condition, use niHSDIO_GetError and niHSDIO_ClearError. + /// + ///The general meaning of the status code is as follows: + /// + ///Value Meaning + ///------------------------------- + ///0 Success + ///Positive Values Warnings + ///Negative Values Errors + /// + /// + public int ResetDevice() + { + int pInvokeResult = PInvoke.ResetDevice(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + #region SetGetMethods + /// + /// + /// + /// + /// + /// + /// + public int SetInt32(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, int val) + { + int pInvokeResult = PInvoke.SetAttributeViInt32(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), val); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int SetInt32(niHSDIOProperties propertyId, int val) + { + return this.SetInt32(propertyId, "", val); + } + /// + /// + /// + /// + /// + /// + /// + public int GetInt32(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, out int val) + { + int pInvokeResult = PInvoke.GetAttributeViInt32(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), out val); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int GetInt32(niHSDIOProperties propertyId, out int val) + { + return this.GetInt32(propertyId, "", out val); + } + /// + /// + /// + /// + /// + /// + /// + public int SetDouble(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, double val) + { + int pInvokeResult = PInvoke.SetAttributeViReal64(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), val); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int SetDouble(niHSDIOProperties propertyId, double val) + { + return this.SetDouble(propertyId, "", val); + } + /// + /// + /// + /// + /// + /// + /// + public int GetDouble(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, out double val) + { + int pInvokeResult = PInvoke.GetAttributeViReal64(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), out val); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int GetDouble(niHSDIOProperties propertyId, out double val) + { + return this.GetDouble(propertyId, "", out val); + } + /// + /// + /// + /// + /// + /// + /// + public int SetBoolean(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, bool val) + { + int pInvokeResult = PInvoke.SetAttributeViBoolean(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), System.Convert.ToUInt16(val)); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int SetBoolean(niHSDIOProperties propertyId, bool val) + { + return this.SetBoolean(propertyId, "", val); + } + /// + /// + /// + /// + /// + /// + /// + public int GetBoolean(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, out bool val) + { + ushort boolAsShort; + int pInvokeResult = PInvoke.GetAttributeViBoolean(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), out boolAsShort); + val = System.Convert.ToBoolean(boolAsShort); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int GetBoolean(niHSDIOProperties propertyId, out bool val) + { + return this.GetBoolean(propertyId, "", out val); + } + /// + /// + /// + /// + /// + /// + /// + public int SetString(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, string val) + { + int pInvokeResult = PInvoke.SetAttributeViString(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), val); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + /// + /// + /// + /// + /// + /// + public int SetString(niHSDIOProperties propertyId, string val) + { + return this.SetString(propertyId, "", val); + } + /// + /// + /// + /// + /// + /// + /// + public int GetString(niHSDIOProperties propertyId, string repeatedCapabilityOrChannel, out string val) + { + System.Text.StringBuilder newVal = new System.Text.StringBuilder(512); + int size = PInvoke.GetAttributeViString(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), 512, newVal); + int ret = 0; + val = ""; + if ((size < 0)) + { + return PInvoke.ThrowError(this._handle, size); + } + else + { + if ((size > 0)) + { + newVal.Capacity = size; + ret = PInvoke.GetAttributeViString(this._handle, repeatedCapabilityOrChannel, Convert.ToInt32(propertyId), size, newVal); + val = newVal.ToString(); + } + } + return PInvoke.TestForError(this._handle, ret); + } + /// + /// + /// + /// + /// + /// + public int GetString(niHSDIOProperties propertyId, out string val) + { + return this.GetString(propertyId, "", out val); + } + + #endregion SetGetMethods + + + #region Property Specific Get/Set + + /// + ///Specifies the voltage threshold that causes the driver to switch from sourcing to sinking current. If the incoming voltage is greater than or equal to the commutating voltage level, the device sinks current. Conversely, if the incoming voltage is less than the commutating voltage level, the device sources current. + /// Valid values range from 2 V to 7 V. + /// The default value is 0 V. + /// The units are volts (V). + /// You can select the PFI channels and clocks in the Channel_Name input in the Set Attributue function using the following strings: PFI1, PFI2, STROBE, and DDC_CLKOUT. These strings are not case sensitive and can be grouped with the standard input strings separated by commas. The following are examples of valid string syntax: 0, 4, 6, PFI1, 7 or 0-12, STROBE, DDC_CLKOUT. + /// Only NI 6556 devices support this attribute. + /// + /// + public int SetActiveLoadCommutatingVoltageLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.ActiveLoadCommutatingVoltageLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetActiveLoadCommutatingVoltageLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ActiveLoadCommutatingVoltageLevel, channel, out value); + } + /// + ///Specifies whether the driver should source or sink current instead of being in a high-impedance state. To enable active load functionality, you must first set the NIHSDIO_ATTR_DATA_TRISTATE_MODE or NIHSDIO_ATTR_DATA_TERMINATION_MODE attributes to NIHSDIO_VAL_HIGH_IMPEDANCE. If the NIHSDIO_ATTR_DATA_TRISTATE_MODE or NIHSDIO_ATTR_DATA_TERMINATION_MODE attributes are set to NIHSDIO_VAL_DRIVE_TERMINATION_VOLTAGE, then you must set this attribute to NIHSDIO_VAL_ACTIVE_LOAD_DISABLED, otherwise NI-HSDIO returns an error. + /// You must set this property to the same value on a channel in both acquisition and generation sessions, or NI-HSDIO returns an error. If you are using both acquisition and generation sessions in your application, when you select a value for this property in a session, NI-HSDIO automatically sets the same value in the other session. However, NI-HSDIO allows you to change the value only in the original session in which you configured it. For example, if you select NIHSDIO_VAL_ACTIVE_LOAD_DISABLED in your acquisition session, your generation session is configured automatically to the same value. If you want to change the value to NIHSDIO_VAL_ACTIVE_LOAD_ENABLED_WHEN_TRISTATE, you can do so only in the acquisition session until you close the original session. + /// You can select the PFI channels and clocks in the channelName input in the set call using the following strings: PFI1, PFI2, STROBE, and DDC_CLKOUT. These strings are not case sensitive and can be grouped with the standard input strings separated by commas. The following are examples of valid string syntax: 0, 4, 6, PFI1, 7 or 0-12, STROBE, DDC_CLKOUT. + /// + /// + public int SetActiveLoadMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.ActiveLoadMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetActiveLoadMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ActiveLoadMode, channel, out value); + } + /// + ///Specifies the amount of current for the driver to sink if the input voltage is greater than or equal to the commutating voltage. + /// Valid values range from 1.5 mA to 24 mA. + /// The default value is 1.5 mA. + /// The units are amps (A). This attribute takes effect only if the NIHSDIO_ATTR_ACTIVE_LOAD_MODE attribute is set to NIHSDIO_VAL_ACTIVE_LOAD_ENABLED_WHEN_TRISTATE in the current session. + /// You can select the PFI channels and clocks in the Channel_Name input in the Set Attributue function using the following strings: PFI1, PFI2, STROBE, and DDC_CLKOUT. These strings are not case sensitive and can be grouped with the standard input strings separated by commas. The following are examples of valid string syntax: 0, 4, 6, PFI1, 7 or 0-12, STROBE, DDC_CLKOUT. + /// Only NI 6556 devices support this attribute. + /// + /// + public int SetActiveLoadSinkingCurrentValue(string channel, double value) + { + return SetDouble(niHSDIOProperties.ActiveLoadSinkingCurrentValue, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetActiveLoadSinkingCurrentValue(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ActiveLoadSinkingCurrentValue, channel, out value); + } + /// + ///Specifies the amount of current for the driver to source if the input voltage is less than the commutating voltage. + /// Valid values range from 1.5 mA to 24 mA. + /// The default value is 1.5 mA. + /// Units are amps (A). + /// This attribute takes effect only if the NIHSDIO_ATTR_ACTIVE_LOAD_MODE attribute is set to NIHSDIO_VAL_ACTIVE_LOAD_ENABLED_WHEN_TRISTATE in the current session. + /// You can select the PFI channels and clocks in the Channel_Name input in the Set Attribute function using the following strings: PFI1, PFI2, STROBE, and DDC_CLKOUT. These strings are not case sensitive and can be grouped with the standard input strings separated by commas. The following are examples of valid string syntax: 0, 4, 6, PFI1, 7 or 0-12, STROBE, DDC_CLKOUT. + /// Only NI 6556 devices support this attribute. + /// + /// + public int SetActiveLoadSourcingCurrentValue(string channel, double value) + { + return SetDouble(niHSDIOProperties.ActiveLoadSourcingCurrentValue, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetActiveLoadSourcingCurrentValue(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ActiveLoadSourcingCurrentValue, channel, out value); + } + /// + ///Use this attribute to specify whether you want the Advance trigger to be a digital edge, pattern match, or software trigger. You can also choose NIHSDIO_VAL_NONE as the value for this attribute. + /// + /// + public int SetAdvanceTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.AdvanceTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetAdvanceTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.AdvanceTriggerType, channel, out value); + } + /// + ///This attribute specifies the voltage above which a clock is considered logic high. The value for this attribute applies to the STROBE terminal in acquisition sessions and to the DDC CLK OUT terminal in generation sessions. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// Valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_CLOCK_VOLTAGE_RANGE attribute. The default value is 3.3 V for generation and 1.7 V for acquisition. Units are in volts. + /// + /// + public int SetClockVoltageHighLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.ClockVoltageHighLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetClockVoltageHighLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ClockVoltageHighLevel, channel, out value); + } + /// + ///This attribute specifies the voltage below which a clock is considered logic low. The value for this attribute applies to the STROBE terminal in acquisition sessions and to the DDC CLK OUT terminal in generation sessions. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// Valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_CLOCK_VOLTAGE_RANGE attribute. The default value is 0 V for generation and 1.6 V for acquisition. Units are in volts. + /// + /// + public int SetClockVoltageLowLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.ClockVoltageLowLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetClockVoltageLowLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ClockVoltageLowLevel, channel, out value); + } + /// + ///This attribute specifies the voltage range used for all clock voltages on the STROBE terminal (used during acquisition sessions) and on the DDC CLK OUT terminal (used during generation sessions). + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetClockVoltageRange(string channel, int value) + { + return SetInt32(niHSDIOProperties.ClockVoltageRange, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetClockVoltageRange(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ClockVoltageRange, channel, out value); + } + /// + ///Specifies the output polarity of the Data Active event. + /// + /// + public int SetDataActiveEventLevelActiveLevel(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataActiveEventLevelActiveLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataActiveEventLevelActiveLevel(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataActiveEventLevelActiveLevel, channel, out value); + } + /// + ///Specifies the destination terminal for the Data Active event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDataActiveEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.DataActiveEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataActiveEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.DataActiveEventOutputTerminal, channel, out value); + } + /// + ///Specifies the position of the Data Active event relative to the Sample clock. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetDataActiveEventPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataActiveEventPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataActiveEventPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataActiveEventPosition, channel, out value); + } + /// + ///Specifies whether the Data Active event terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDataActiveEventTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataActiveEventTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataActiveEventTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataActiveEventTerminalConfiguration, channel, out value); + } + /// + ///Configures the number of Sample clock cycles to delay the internal Data Active event. Internally routing a delayed version of this event is useful when you want to synchronize an acquisition trigger to the generation operation. Use this coarse delay together with the finer-resolution data delay to compensate for the round trip delay of data in stimulus/response operations. + /// You can configure the delayed Data Active event as the source for any acquisition trigger by manually entering DelayedDataActiveEvent as the trigger source parameter in the appropriate trigger configuration function or VI instance. + /// This attribute is only applicable in acquisition sessions and cannot be set as the trigger source when using STROBE as the external Sample Clock. + /// Valid values for this attribute are 0 to 24. The units are in Sample clock cycles. + /// + /// + public int SetDataActiveInternalRouteDelay(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataActiveInternalRouteDelay, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataActiveInternalRouteDelay(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataActiveInternalRouteDelay, channel, out value); + } + /// + ///This attribute specifies, per channel, the fixed time delay of acquired or generated data. The value of this attribute is added to the value of the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute to determine the total delay. Unlike the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute, this attribute is specified in seconds. Valid values, in seconds, depend on your clock rate and are represented by the equation 2(1/f) to +3(1/f), where f is the frequency of your clock rate. The default value is 0. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetDataDeskew(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataDeskew, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataDeskew(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataDeskew, channel, out value); + } + /// + ///Use this attribute to select between acquiring high/low data or valid/invalid data during a static or dynamic acquisition operation. + /// Select high/low mode to get logic high or logic low values. Use valid/invalid mode to tell if the signal is within the specified voltage range (above data voltage low level but below data voltage high level) or outside the range (below data voltage low level or above data voltage high level). + /// Note: NI 654X/656X devices only support the high/low mode of data interpretation. NI-HSDIO returns an error if you select valid/invalid mode for an acquisition with these devices. + /// Refer to your specific hardware documentation to understand how data is returned to you. This attribute is valid only for acquisition sessions. + /// + /// + public int SetDataInterpretation(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataInterpretation, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataInterpretation(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataInterpretation, channel, out value); + } + /// + ///This attribute specifies which edge of the Sample clock signal is used to time the generation or acquisition. You can also configure the device to generate or acquire data at a configurable delay past each rising edge of the Sample clock. When this attribute is set to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE, use the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute to specify the delay value. + /// NOTE: On NI 6555/6556 devices, this attribute is per channel selectable. + /// NOTE: To configure a delay on NI 656x devices, you must delay all channels on the device. NI-HSDIO returns an error if you apply a delay to only a partial channel list. + /// Refer to the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute for more information about multibank data delay. + /// + /// + public int SetDataPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataPosition, channel, out value); + } + /// + ///This attribute specifies the delay after the Sample clock rising edge when the device generates or acquires a new data sample. Data delay is expressed as a fraction of the clock period (for example, a fraction of 1/NIHSDIO_ATTR_SAMPLE_CLOCK_RATE). This attribute is relevant only when the NIHSDIO_ATTR_DATA_POSITION attribute is set to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE. + /// The NI 6547/6548 supports multibank data delay. All channels configured to NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE and assigned to the same data delay bank must share a data delay value, even if channels on that bank are configured to NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE or NIHSDIO_VAL_SAMPLE_CLOCK_FALLING_EDGE. NI-HSDIO returns an error if you set different delay values for two channels within the same bank. + /// Refer to the multibank data delay topic in the NI Digital Waveform Generator/Analyzer Help file for more information about which channels belong to which banks. + /// NOTE: On NI 6555/6556 devices, valid values range from 1 to 2 clock cycles in increments of 0.001 cycles. Delay on NI 6555/6556 devices is configured on a per channel basis. + /// NOTE: To configure a delay on NI 656x devices, you must delay all channels on the device. NI-HSDIO returns an error if you apply a delay to only a partial channel list. + /// + /// + public int SetDataPositionDelay(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataPositionDelay, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataPositionDelay(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataPositionDelay, channel, out value); + } + /// + ///Specifies whether you want the device to acquire or generate in single data rate (SDR) mode or in double data rate (DDR) mode. + /// In SDR mode, the device generates or acquires data on a single edge of the Sample clock. Therefore, you can generate or acquire data on the rising or falling edge of every Sample clock pulse or on a delayed version of the rising edge of the Sample clock. + /// In DDR mode, the device generates or acquires data on both edges of the Sample clock. Therefore, you can generate or acquire data on every rising and falling edge of the Sample clock. Acquisition and generation sessions can be configured in DDR mode to acquire or generate the first data sample on the rising or falling edge of the clock or on a delayed version of the rising edge of the clock. + /// + /// + public int SetDataRateMultiplier(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataRateMultiplier, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataRateMultiplier(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataRateMultiplier, channel, out value); + } + /// + ///This attribute specifies the action taken by NI-HSDIO when a channel is tristated. A tristate condition can occur during initial states, idle states, per cycle tristate, and static tristate. Selecting NIHSDIO_VAL_HIGH_IMPEDANCE sets the channel to a high-impedance state when tristated. Selecting NIHSDIO_VAL_DRIVE_TERMINATION_VOLTAGE sets the channel to drive a termination voltage (VTT). This attribute is valid only for acquisition sessions. + /// NOTE: If you set the NIHSDIO_ATTR_DATA_TERMINATION_MODE and NIHSDIO_ATTR_DATA_TRISTATE_MODE attributes to different values on the same channel, NI-HSDIO returns an error. + /// NOTE: This attribute is supported only on NI 6555/6556 devices. + /// + /// + public int SetDataTerminationMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataTerminationMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTerminationMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataTerminationMode, channel, out value); + } + /// + ///This attribute specifies the termination voltage level for the active channels in this session. This attribute applies to static and dynamic data operations in acquisition or generation sessions. Refer to the NIHSDIO_ATTR_DATA_TRISTATE_MODE attribute to drive the termination voltage for a generation session or to the NIHSDIO_ATTR_DATA_TERMINATION_MODE attribute to drive the termination voltage for an acquisition session. Refer to the NI PXIe-6555/6556 Specifications for more information about accuracy. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// Valid values range from -2 to 7 V, depending on the range selected with the NIHSDIO_ATTR_DATA_VOLTAGE_RANGE attribute. The default value is 0. Units are in volts. + /// + /// + public int SetDataTerminationVoltageLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataTerminationVoltageLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTerminationVoltageLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataTerminationVoltageLevel, channel, out value); + } + /// + ///Specifies the number of samples to download to onboard memory at one time. + /// + /// + public int SetDataTransferBlockSize(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataTransferBlockSize, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTransferBlockSize(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataTransferBlockSize, channel, out value); + } + /// + ///Specifies the maximum amount of bus bandwidth (in bytes per second) to use for data transfers. The high-speed digital device limits data transfer speeds on the PCIe bus to the value you specify for this attribute. Set this attribute to optimize bus bandwidth usage for multi-device streaming applications by preventing the high-speed digital device from consuming all of the available bandwidth on a PCIe link when waveforms are being written to the onboard memory of the device. + /// + /// + public int SetDataTransferMaximumBandwidth(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataTransferMaximumBandwidth, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTransferMaximumBandwidth(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataTransferMaximumBandwidth, channel, out value); + } + /// + ///Specifies the maximum number of concurrent PCI Express read requests the high-speed digital device can issue. + /// When transferring data from computer memory to device onboard memory across the PCI Express bus, the high-speed digital device can issue multiple memory reads at the same time. In general, the larger the number of read requests, the more efficiently the device uses the bus. This efficiency is caused by the multiple read requests that keep data flowing, even in a PCI Express topology that has high latency due to PCI Express switches in the data path. Most NI devices can issue a large number of read requests (typically 8 or 16). By default, this attribute is set to the highest value the high-speed digital device supports. + /// If other devices in your system cannot tolerate long data latencies, it may be helpful to decrease the number of in-flight read requests the high-speed digital device issues. This change helps to reduce the amount of data the high-speed digital device reads at one time. + /// + /// + public int SetDataTransferMaximumInFlightReads(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataTransferMaximumInFlightReads, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTransferMaximumInFlightReads(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataTransferMaximumInFlightReads, channel, out value); + } + /// + ///Specifies the preferred size of the data field in a PCI Express read request packet. In general, the larger the packet size, the more efficiently the device uses the bus. By default, NI high-speed digital devices use the largest packet size allowed by the system. However, due to different system implementations, some systems may perform better with smaller packet sizes. + /// Recommended values for this attribute are powers of two between 64 and 512. + /// Note: In some cases, the high-speed digital device generates packets smaller than the preferred size you set with this attribute. + /// + /// + public int SetDataTransferPreferredPacketSize(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataTransferPreferredPacketSize, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTransferPreferredPacketSize(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataTransferPreferredPacketSize, channel, out value); + } + /// + ///This attribute specifies the action taken by NI-HSDIO when a channel is tristated. A tristate condition can occur during initial states, idle states, per cycle tristate, and static tristate. Selecting NIHSDIO_VAL_HIGH_IMPEDANCE sets the channel to a high-impedance state when tristated. To drive a termination voltage on a channel in a generation session, select NIHSDIO_VAL_DRIVE_TERMINATION_VOLTAGE. This attribute is valid only for generation sessions. + /// NOTE: If you set the NIHSDIO_ATTR_DATA_TERMINATION_MODE and NIHSDIO_ATTR_DATA_TRISTATE_MODE attributes to different values on the same channel, NI-HSDIO returns an error. + /// NOTE: This attribute is supported only on NI 6555/6556 devices. + /// + /// + public int SetDataTristateMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataTristateMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataTristateMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataTristateMode, channel, out value); + } + /// + ///This attribute sets the high data voltage level for the session. For an acquisition session, this sets the Acquisition Voltage High Level. For a generation session, this sets the Generation Voltage High Level. This attribute applies to static and dynamic data operations. + /// NOTE: On the NI 6555/6556 devices, this attribute is per channel selectable and valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_DATA_VOLTAGE_RANGE attribute. + /// NOTE: NI 656x devices do not support configuring voltage levels. NI-HSDIO returns an error if you use this attribute when programming those devices. + /// + /// + public int SetDataVoltageHighLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataVoltageHighLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataVoltageHighLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataVoltageHighLevel, channel, out value); + } + /// + ///This attribute sets the low data voltage level for the session. For an acquisition session, this attribute sets the low voltage threshold. For a generation session, this attribute sets the Generation Voltage Low Level. This attribute applies to static and dynamic data operations. + /// NOTE: On the NI 6555/6556 devices, this attribute is per channel selectable and valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_DATA_VOLTAGE_RANGE attribute. + /// NOTE: NI 656x devices do not support configuring voltage levels. NI-HSDIO returns an error if you use this attribute when programming those devices. + /// + /// + public int SetDataVoltageLowLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.DataVoltageLowLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataVoltageLowLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DataVoltageLowLevel, channel, out value); + } + /// + ///This attribute specifies the voltage range used for all voltages on the selected channel. You must use the same voltage range for all voltages on a channel in both acquisition and generation sessions, or NI-HSDIO returns an error. If you are using both acquisition and generation sessions in your application, when you set a voltage range in a session, NI-HSDIO automatically sets the same range in the other session. However, NI-HSDIO allows you to change the voltage range only in the original session in which you configured the voltage range. For example, if you select NIHSDIO_VAL_MINUS_2_TO_6_VOLTAGE_RANGE in your acquisition session, your generation session is configured automatically to the same range, but if you want to change the range to NIHSDIO_VAL_MINUS_1_TO_7_VOLTAGE_RANGE, you can do so only in the acquisition session. This attribute is valid for generation and acquisition sessions. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetDataVoltageRange(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataVoltageRange, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataVoltageRange(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataVoltageRange, channel, out value); + } + /// + ///Specifies, in bytes, the size of a raw sample from the operation. + /// For NI 6544/6545/6547/6548/6555/6556 devices, this attribute is R/W for both acquisition and generation; but for all other NI HSDIO devices this attribute is R/W for acquisition and RO for generation. + /// + /// + public int SetDataWidth(string channel, int value) + { + return SetInt32(niHSDIOProperties.DataWidth, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDataWidth(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DataWidth, channel, out value); + } + /// + ///Specifies the active edge for the Advance trigger. This attribute is used only when NIHSDIO_ATTR_ADVANCE_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. + /// + /// + public int SetDigitalEdgeAdvanceTriggerEdge(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerEdge, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeAdvanceTriggerEdge(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerEdge, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital edge Advance trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalEdgeAdvanceTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalEdgeAdvanceTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeAdvanceTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalEdgeAdvanceTriggerImpedance, channel, out value); + } + /// + ///Specifies the position where the Advance trigger is asserted, relative to the Sample clock. Trigger voltages and positions are only relevant if the trigger source is a front panel connector. + /// + /// + public int SetDigitalEdgeAdvanceTriggerPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeAdvanceTriggerPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerPosition, channel, out value); + } + /// + ///Specifies the source terminal for the Advance trigger. This attribute is used only when NIHSDIO_ATTR_ADVANCE_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. You may specify any valid source terminal for this attribute. However, trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + /// + public int SetDigitalEdgeAdvanceTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalEdgeAdvanceTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeAdvanceTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalEdgeAdvanceTriggerSource, channel, out value); + } + /// + ///Specifies whether the Advance trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalEdgeAdvanceTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeAdvanceTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeAdvanceTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active edge for the Reference trigger. This attribute is used when NIHSDIO_ATTR_REF_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetDigitalEdgeRefTriggerEdge(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeRefTriggerEdge, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeRefTriggerEdge(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeRefTriggerEdge, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital edge Reference trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalEdgeRefTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalEdgeRefTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeRefTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalEdgeRefTriggerImpedance, channel, out value); + } + /// + ///Specifies the position where the Reference trigger is latched, relative to the Sample clock. Trigger voltages and positions are only relevant if the trigger source is a front panel connector. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetDigitalEdgeRefTriggerPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeRefTriggerPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeRefTriggerPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeRefTriggerPosition, channel, out value); + } + /// + ///Specifies the source terminal for the Reference trigger. This attribute is used only when NIHSDIO_ATTR_REF_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. You may specify any valid source terminal for this attribute. However, trigger voltages and positions are only relevant if the trigger source is a front panel connector. + /// + /// + public int SetDigitalEdgeRefTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalEdgeRefTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeRefTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalEdgeRefTriggerSource, channel, out value); + } + /// + ///Specifies whether the Reference trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalEdgeRefTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeRefTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeRefTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeRefTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active edge for the Script trigger. This attribute is used when NIHSDIO_ATTR_SCRIPT_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalEdgeScriptTriggerEdge(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeScriptTriggerEdge, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeScriptTriggerEdge(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeScriptTriggerEdge, channel, out value); + } + /// + ///Specifies the impedance on the channel configured for the digital edge Script trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalEdgeScriptTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalEdgeScriptTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeScriptTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalEdgeScriptTriggerImpedance, channel, out value); + } + /// + ///Specifies the source terminal for the Script trigger. This attribute is used when NIHSDIO_ATTR_SCRIPT_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. Trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalEdgeScriptTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalEdgeScriptTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeScriptTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalEdgeScriptTriggerSource, channel, out value); + } + /// + ///Specifies whether the Script trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalEdgeScriptTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeScriptTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeScriptTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeScriptTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active edge for the Start trigger. This attribute is used only when NIHSDIO_ATTR_START_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. + /// + /// + public int SetDigitalEdgeStartTriggerEdge(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeStartTriggerEdge, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStartTriggerEdge(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeStartTriggerEdge, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital edge Start trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalEdgeStartTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalEdgeStartTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStartTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalEdgeStartTriggerImpedance, channel, out value); + } + /// + ///Specifies the position where the Start trigger is asserted, relative to the Sample clock. Trigger voltages and positions are only relevant if the trigger source is a front panel connector. + /// + /// + public int SetDigitalEdgeStartTriggerPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeStartTriggerPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStartTriggerPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeStartTriggerPosition, channel, out value); + } + /// + ///Specifies the source terminal for the Start trigger. This attribute is used only when NIHSDIO_ATTR_START_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. You may specify any valid source terminal for this attribute. However, trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// + /// + public int SetDigitalEdgeStartTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalEdgeStartTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStartTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalEdgeStartTriggerSource, channel, out value); + } + /// + ///Specifies whether the Start trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalEdgeStartTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeStartTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStartTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeStartTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active edge for the Stop trigger. This attribute is used only when NIHSDIO_ATTR_STOP_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalEdgeStopTriggerEdge(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeStopTriggerEdge, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStopTriggerEdge(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeStopTriggerEdge, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital edge Stop trigger. + /// This attribute is valid only for generation sessions. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalEdgeStopTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalEdgeStopTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStopTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalEdgeStopTriggerImpedance, channel, out value); + } + /// + ///Specifies the source terminal for the Stop trigger. This attribute is used only when NIHSDIO_ATTR_STOP_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_EDGE. You may specify any valid source terminal for this attribute. However, trigger voltages and positions are only relevant if the source of the trigger is from the front panel connectors. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalEdgeStopTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalEdgeStopTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStopTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalEdgeStopTriggerSource, channel, out value); + } + /// + ///Specifies that the Stop trigger terminal is configured for single-ended operations. Stop trigger does not support LVDS operations. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalEdgeStopTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalEdgeStopTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalEdgeStopTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalEdgeStopTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital level Pause trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalLevelPauseTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalLevelPauseTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelPauseTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalLevelPauseTriggerImpedance, channel, out value); + } + /// + ///Specifies the position where the pause trigger is asserted, relative to the Sample clock. Trigger voltages and positions are only relevant if the trigger source is a front panel connector. + /// + /// + public int SetDigitalLevelPauseTriggerPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalLevelPauseTriggerPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelPauseTriggerPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalLevelPauseTriggerPosition, channel, out value); + } + /// + ///Specifies the source terminal for the Pause trigger. + /// This attribute applies only to acquisition operations. + /// + /// + public int SetDigitalLevelPauseTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalLevelPauseTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelPauseTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalLevelPauseTriggerSource, channel, out value); + } + /// + ///Specifies whether the Pause trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalLevelPauseTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalLevelPauseTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelPauseTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalLevelPauseTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active level for pausing the dynamic operation. + /// + /// + public int SetDigitalLevelPauseTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalLevelPauseTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelPauseTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalLevelPauseTriggerWhen, channel, out value); + } + /// + ///Specifies the impedance on the channel confiugred for the digital level Script trigger. Valid values for this attribute vary by device. Refer to your device documentation for more information about the valid impedance settings. + /// This attribute is only set if the trigger is configured to use a PFI channel, and it is ignored if the trigger is configured for any other channel. + /// + /// + public int SetDigitalLevelScriptTriggerImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.DigitalLevelScriptTriggerImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelScriptTriggerImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DigitalLevelScriptTriggerImpedance, channel, out value); + } + /// + ///Specifies the source terminal for the Script trigger. This attribute is used when NIHSDIO_ATTR_SCRIPT_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_LEVEL. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalLevelScriptTriggerSource(string channel, string value) + { + return SetString(niHSDIOProperties.DigitalLevelScriptTriggerSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelScriptTriggerSource(string channel, out string value) + { + return GetString(niHSDIOProperties.DigitalLevelScriptTriggerSource, channel, out value); + } + /// + ///Specifies whether the Script trigger terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetDigitalLevelScriptTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalLevelScriptTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelScriptTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalLevelScriptTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the active level for the Script trigger. This attribute is used when NIHSDIO_ATTR_SCRIPT_TRIGGER_TYPE is set to NIHSDIO_VAL_DIGITAL_LEVEL. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetDigitalLevelScriptTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.DigitalLevelScriptTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDigitalLevelScriptTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DigitalLevelScriptTriggerWhen, channel, out value); + } + /// + ///Enables the device for Direct DMA writes. + /// This attribute is valid only for dynamic generation sessions. + /// + /// + public int SetDirectDmaEnabled(string channel, bool value) + { + return SetBoolean(niHSDIOProperties.DirectDmaEnabled, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDirectDmaEnabled(string channel, out bool value) + { + return GetBoolean(niHSDIOProperties.DirectDmaEnabled, channel, out value); + } + /// + ///Specifies the start address for the direct DMA window. + /// + /// + public int SetDirectDmaWindowAddress(string channel, int value) + { + return SetInt32(niHSDIOProperties.DirectDmaWindowAddress, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDirectDmaWindowAddress(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DirectDmaWindowAddress, channel, out value); + } + /// + ///Specifies the direct DMA window size (in bytes). + /// + /// + public int SetDirectDmaWindowSize(string channel, int value) + { + return SetInt32(niHSDIOProperties.DirectDmaWindowSize, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDirectDmaWindowSize(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DirectDmaWindowSize, channel, out value); + } + /// + ///Specifies the drive type for generation + /// 655x and 654x devices can generate data as active drive (drive 0 and drive 1) or open collector data (drive 0 and tristate). This attribute is valid only for generation sessions. + /// + /// + public int SetDriveType(string channel, int value) + { + return SetInt32(niHSDIOProperties.DriveType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDriveType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.DriveType, channel, out value); + } + /// + ///Assigns channels for dynamic operation. The group of dynamic channels is changed each time this attribute is set. For example, setting this attribute to "0-10" and then setting it to "5-8" results in only channels 5-8 being assigned to dynamic. Channels 0-4 and 9-10 are no longer assigned to the dynamic operation by the second configuration. + /// Setting an empty string to this attribute configures ALL channels for dynamic. Writing "None" removes all channels from the dynamic operation. The session must be committed before changes to this attribute take affect (refer to niHSDIO_CommitDynamic for more information on committing a session). + /// You can configure a channel for more than one simultaneous operation. A channel can be simultaneously configured for the following operations: + /// - Dynamic generation and any (static and/or dynamic) acquisition + /// - Static generation and any (static and/or dynamic) acquisition + /// - Both static and dynamic acquisition + /// NOTE: You cannot configure a particular channel for simultaneous dynamic and static generation. + /// Unconfiguring a dynamic generation channel frees that channel to be reconfigured for static generation. Unconfiguring a dynamic generation channel does not stop the channel from driving its current valueany value already written to the channel continues to be driven. + /// Syntax examples: + /// "2-15" or "15-2" set channels 2 through 15 for dynamic operation + /// "0, 3, 10" or "3, 10, 0" set channels 0, 3, and 10 for dynamic operation + /// "" (empty string) sets all channels for dynamic operation + /// "None" removes all channels from dynamic operation. + /// + /// + public int SetDynamicChannels(string channel, string value) + { + return SetString(niHSDIOProperties.DynamicChannels, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetDynamicChannels(string channel, out string value) + { + return GetString(niHSDIOProperties.DynamicChannels, channel, out value); + } + /// + ///Specifies the destination terminal for the End of Record event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetEndOfRecordEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.EndOfRecordEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEndOfRecordEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.EndOfRecordEventOutputTerminal, channel, out value); + } + /// + ///Specifies the output polarity of the End of Record event. This attribute is valid only for acquisition sessions. + /// + /// + public int SetEndOfRecordEventPulsePolarity(string channel, int value) + { + return SetInt32(niHSDIOProperties.EndOfRecordEventPulsePolarity, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEndOfRecordEventPulsePolarity(string channel, out int value) + { + return GetInt32(niHSDIOProperties.EndOfRecordEventPulsePolarity, channel, out value); + } + /// + ///Specifies whether the End of Record event terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetEndOfRecordEventTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.EndOfRecordEventTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEndOfRecordEventTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.EndOfRecordEventTerminalConfiguration, channel, out value); + } + /// + ///This attribute specifies the delay after the Sample clock rising edge when the device initiates an event. The value of this attribute is added to the value of the NIHSDIO_ATTR_EVENT_POSITION_DELAY attribute to determine the total delay. Unlike the NIHSDIO_ATTR_EVENT_POSITION_DELAY attribute, this attribute is specified in seconds. Valid values, in seconds, depend on your clock rate and are represented by the equation 2(1/f) to +3(1/f), where f is the frequency of your clock rate. The default value is 0. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetEventDeskew(string channel, double value) + { + return SetDouble(niHSDIOProperties.EventDeskew, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEventDeskew(string channel, out double value) + { + return GetDouble(niHSDIOProperties.EventDeskew, channel, out value); + } + /// + ///This attribute specifies the delay after the Sample clock rising edge when the device initiates an event. Event delay is expressed as a fraction of the clock period (for example, a fraction of 1/Sample clock rate). Valid values range from 1 to 2 clock cycles in increments of 0.001 cycles. The default value is 0. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetEventPositionDelay(string channel, double value) + { + return SetDouble(niHSDIOProperties.EventPositionDelay, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEventPositionDelay(string channel, out double value) + { + return GetDouble(niHSDIOProperties.EventPositionDelay, channel, out value); + } + /// + ///This attribute sets the high event voltage level for the session. If you do not explicitly set this attribute, NI-HSDIO assumes the same value as NIHSDIO_ATTR_DATA_VOLTAGE_HIGH_LEVEL for the generation session. + /// For NI 6555/6556 devices, this attribute is subject to the following restrictions: this attribute is supported only in generation sessions, only PFI 1 and PFI 2 support this attribute (PFI 0, PFI 3, and PFI 24-31 are always set to the 3.3V logic family), valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_EVENT_VOLTAGE_RANGE attribute, and the default value is 3.3 V. + /// + /// + public int SetEventVoltageHighLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.EventVoltageHighLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEventVoltageHighLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.EventVoltageHighLevel, channel, out value); + } + /// + ///This attribute sets the low event voltage level for the session. If you do not explicitly set this attribute, NI-HSDIO assumes the same value as NIHSDIO_ATTR_DATA_VOLTAGE_LOW_LEVEL for the generation session. + /// For NI 6555/6556 devices, this attribute is subject to the following restrictions: this attribute is supported only in generation sessions, only PFI 1 and PFI 2 support this attribute (PFI 0, PFI 3, and PFI 24-31 are always set to the 3.3V logic family), valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_EVENT_VOLTAGE_RANGE attribute, and the default value is 0 V. + /// + /// + public int SetEventVoltageLowLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.EventVoltageLowLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEventVoltageLowLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.EventVoltageLowLevel, channel, out value); + } + /// + ///This attribute specifies the voltage range used for all event voltages on all PFI channels that support voltage configuration. Only PFI 1 and PFI 2 support voltage configuration. This attribute is valid only for generation sessions. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetEventVoltageRange(string channel, int value) + { + return SetInt32(niHSDIOProperties.EventVoltageRange, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetEventVoltageRange(string channel, out int value) + { + return GetInt32(niHSDIOProperties.EventVoltageRange, channel, out value); + } + /// + ///Specifies the destination terminal for exporting the Advance trigger. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetExportedAdvanceTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedAdvanceTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedAdvanceTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedAdvanceTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies whether the Advance trigger output terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetExportedAdvanceTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedAdvanceTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedAdvanceTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedAdvanceTriggerTerminalConfiguration, channel, out value); + } + /// + ///Use this attribute to export the Onboard Reference clock to the specified terminal. This attribute is valid only for PCI devices. + /// + /// + public int SetExportedOnboardRefClockOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedOnboardRefClockOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedOnboardRefClockOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedOnboardRefClockOutputTerminal, channel, out value); + } + /// + ///Specifies the destination terminal for the exported Pause trigger. Event voltages and positions are only relevant if the destination of the event is one of the front panel connectors. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetExportedPauseTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedPauseTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedPauseTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedPauseTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies whether the Pause trigger output terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetExportedPauseTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedPauseTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedPauseTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedPauseTriggerTerminalConfiguration, channel, out value); + } + /// + ///Use this attribute to export the Reference clock to the specified terminal. + /// + /// + public int SetExportedRefClockOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedRefClockOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedRefClockOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedRefClockOutputTerminal, channel, out value); + } + /// + ///Specifies the destination terminal for exporting the Reference trigger. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetExportedRefTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedRefTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedRefTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedRefTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies whether the exported Reference trigger output terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetExportedRefTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedRefTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedRefTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedRefTriggerTerminalConfiguration, channel, out value); + } + /// + ///Use this attribute to specify the delay of the exported Sample clock relative to the Sample clock used by the device. This attribute is relevant only when NIHSDIO_ATTR_EXPORTED_SAMPLE_CLOCK_MODE is set to NIHSDIO_VAL_DELAYED. Otherwise, this attribute is ignored. This attribute is specified as fraction of the Sample clock period, that is, as fraction of (1/NIHSDIO_ATTR_SAMPLE_CLOCK_RATE). On NI 6544/6545/6547/6548 devices, this attribute is not supported for acquisition. + /// + /// + public int SetExportedSampleClockDelay(string channel, double value) + { + return SetDouble(niHSDIOProperties.ExportedSampleClockDelay, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedSampleClockDelay(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ExportedSampleClockDelay, channel, out value); + } + /// + ///Use this attribute to specify the position of the exported Sample clock relative to the Sample clock used by the device. When the Sample clock rate is set to less than 25 MS/s, this attribute must not be set to NIHSDIO_VAL_DELAYED. + /// NOTE: NI 6544/6545/6547/6548 devices support delay at any onboard clock rate, and also with external clock rates greater than 20 MHz. + /// + /// + public int SetExportedSampleClockMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedSampleClockMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedSampleClockMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedSampleClockMode, channel, out value); + } + /// + ///Use this attribute to offset the exported clock by a fixed time. Refer to the Dynamic Generation Timing Diagrams for your device for more information about changing this value. + /// Valid values for this attribute are 2.5e-9 and 0 for the NI 6541/6542/6551/6552 devices, 1.65e-9 for the NI 6544/6545/6547/6548 devices, 2.4e-9 and 0 for the NI 6555/6556 devices, and 1.6e-9 for the NI 656X devices. The units are in seconds. + /// + /// + public int SetExportedSampleClockOffset(string channel, double value) + { + return SetDouble(niHSDIOProperties.ExportedSampleClockOffset, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedSampleClockOffset(string channel, out double value) + { + return GetDouble(niHSDIOProperties.ExportedSampleClockOffset, channel, out value); + } + /// + ///Use this attribute to export the Sample clock to the specified terminal. + /// + /// + public int SetExportedSampleClockOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedSampleClockOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedSampleClockOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedSampleClockOutputTerminal, channel, out value); + } + /// + ///Use this attribute to specify the output terminals for the exported Script trigger. Setting this attribute to an empty string means that when you commit the session, the signal is removed from the previously configured terminal and, if possible, the terminal is tristated. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetExportedScriptTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedScriptTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedScriptTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedScriptTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies whether the Script trigger output terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetExportedScriptTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedScriptTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedScriptTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedScriptTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the destination terminal for exporting the Start trigger. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetExportedStartTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedStartTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedStartTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedStartTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies the terminal configuration for the exported Start trigger terminal. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetExportedStartTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedStartTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedStartTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedStartTriggerTerminalConfiguration, channel, out value); + } + /// + ///Specifies the destination terminal for exporting the Stop trigger. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetExportedStopTriggerOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ExportedStopTriggerOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedStopTriggerOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ExportedStopTriggerOutputTerminal, channel, out value); + } + /// + ///Specifies that the Stop trigger output terminal is configured for single-ended operations. This attribute is valid only for generation sessions. + /// + /// + public int SetExportedStopTriggerTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ExportedStopTriggerTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetExportedStopTriggerTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ExportedStopTriggerTerminalConfiguration, channel, out value); + } + /// + ///Use this attribute to query how many acquired samples remain in onboard memory. This attribute is used with NIHSDIO_ATTR_FETCH_OFFSET and NIHSDIO_FETCH_RELATIVE_TO. This attribute returns the number of samples available from the specified relativeTo and offset. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int GetFetchBacklog(string channel, out int value) + { + return GetInt32(niHSDIOProperties.FetchBacklog, channel, out value); + } + /// + ///Offset in samples to start fetching acquired waveform data. The offset is applied relative to the NIHSDIO_ATTR_FETCH_RELATIVE_TO position. Offset can be a positive or negative value. + /// If the specified offset would cause the fetch to exceed the end of the waveform, NI-HSDIO returns a data overwrite error. If the selected offset would cause the fetch location to occur before the start of the waveform, the fetch location is coerced to the beginning of the waveform. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetFetchOffset(string channel, int value) + { + return SetInt32(niHSDIOProperties.FetchOffset, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetFetchOffset(string channel, out int value) + { + return GetInt32(niHSDIOProperties.FetchOffset, channel, out value); + } + /// + ///Specifies the absolute location within the acquired record from which to begin fetching. The default value is NIHSDIO_VAL_CURRENT_READ_POSITION. If the Reference trigger is enabled, the read position is initially set to the first pretrigger sample. If the Reference trigger is disabled, the read position is initially set to the first sample acquired. After every fetch, the read position moves to the sample immediately after the last fetched sample. Thus, if you call fetch multiple times and NIHSDIO_ATTR_FETCH_RELATIVE_TO is set to NIHSDIO_VAL_CURRENT_READ_POSITION, each fetch retrieves a different part of the record. If NIHSDIO_ATTR_FETCH_RELATIVE_TO is set to any other value, you must modify NIHSDIO_ATTR_FETCH_OFFSET between fetches to fetch different parts of the record. + /// + /// + public int SetFetchRelativeTo(string channel, int value) + { + return SetInt32(niHSDIOProperties.FetchRelativeTo, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetFetchRelativeTo(string channel, out int value) + { + return GetInt32(niHSDIOProperties.FetchRelativeTo, channel, out value); + } + /// + ///Use this attribute to specify whether to generate the waveform specified by NIHSDIO_ATTR_WAVEFORM_TO_GENERATE or the script specified by NIHSDIO_ATTR_SCRIPT_TO_GENERATE upon calling niHSDIO_Initiate. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetGenerationMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.GenerationMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetGenerationMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.GenerationMode, channel, out value); + } + /// + ///Returns an aggregate bit error mask. If a channel had a hardware compare sample error at any point in the execution, the bit corresponding to that channel is enabled. Use this property to quickly figure out which channel reported a sample error independently of the state of the hardware compare FIFO. + /// + /// + public int GetHwcCumulativeErrorBits(string channel, out int value) + { + return GetInt32(niHSDIOProperties.HwcCumulativeErrorBits, channel, out value); + } + /// + ///Specifies whether the device stores and counts errors when the same error appears in consecutive samples. If this attribute is set to VI_TRUE, the device only counts distinct errors, which means an error where the actual and expected response are identical. The niHSDIO_HWC_FetchSampleErrors function returns the number of clock cycles for which the repeated error occurred. + /// This attribute is helpful if your NI device clock rate is significantly faster than your DUT clock rate. In this case, one error from the DUT could result in several identical errors on the device. + /// + /// + public int SetHwcFilterRepeatedSampleErrors(string channel, bool value) + { + return SetBoolean(niHSDIOProperties.HwcFilterRepeatedSampleErrors, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetHwcFilterRepeatedSampleErrors(string channel, out bool value) + { + return GetBoolean(niHSDIOProperties.HwcFilterRepeatedSampleErrors, channel, out value); + } + /// + ///Returns the total number of sample errors since the acquisition was initiated. Use this attribute, along with NIHSDIO_ATTR_HWC_SAMPLES_COMPARED, to calculate the sample error rate. + /// + /// + public int GetHwcNumSampleErrors(string channel, out int value) + { + return GetInt32(niHSDIOProperties.HwcNumSampleErrors, channel, out value); + } + /// + ///Returns the number of sample errors available you can read using the niHSDIO_HWC_FetchSampleErrors function. + /// + /// + public int GetHwcSampleErrorBacklog(string channel, out int value) + { + return GetInt32(niHSDIOProperties.HwcSampleErrorBacklog, channel, out value); + } + /// + ///Returns whether the buffer used to store sample errors has overflowed. If the buffer overflows, the hardware stops storing error information for further errors, but it continues to compare data and count the sample errors encountered. + /// You can remove sample errors from the FIFO using the niHSDIO_HWC_FetchSampleErrors function. Removing sample errors creates room for additional sample errors to be stored in the FIFO. + /// + /// + public int GetHwcSampleErrorBufferOverflowed(string channel, out bool value) + { + return GetBoolean(niHSDIOProperties.HwcSampleErrorBufferOverflowed, channel, out value); + } + /// + ///Specifies the destination terminal for the Sample Error event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetHwcSampleErrorEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.HwcSampleErrorEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetHwcSampleErrorEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.HwcSampleErrorEventOutputTerminal, channel, out value); + } + /// + ///Returns the total number of samples compared since the acquisition was initiated. Use this attribute, along with NIHSDIO_ATTR_HWC_NUM_SAMPLE_ERRORS, to calculate sample error rate. + /// + /// + public int GetHwcSamplesCompared(string channel, out double value) + { + return GetDouble(niHSDIOProperties.HwcSamplesCompared, channel, out value); + } + /// + ///Specifies the idle state for a channel. + /// A dynamic generation operation may be idle when the operation completes normally, when the operation pauses, or when it terminates because of an underflow error. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetIdleState(string channel, int value) + { + return SetInt32(niHSDIOProperties.IdleState, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetIdleState(string channel, out int value) + { + return GetInt32(niHSDIOProperties.IdleState, channel, out value); + } + /// + ///Specifies the channel state after the session is initiated but before the first waveform sample is generated. The channel changes to the Initial state after the data operation has been initiated. When the Start trigger occurs, the Initial state is replaced by the first sample in the waveform. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetInitialState(string channel, int value) + { + return SetInt32(niHSDIOProperties.InitialState, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetInitialState(string channel, out int value) + { + return GetInt32(niHSDIOProperties.InitialState, channel, out value); + } + /// + ///Use this attribute to change input impedance for the data channels. Refer to the device documentation for more information about input impedance. + /// Valid values for this attribute vary by device. Refer to your device documentation for more information on the supported impedance values. The units are in ohms. + /// + /// + public int SetInputImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.InputImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetInputImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.InputImpedance, channel, out value); + } + /// + ///Specifies the destination terminal for the Marker event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetMarkerEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.MarkerEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetMarkerEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.MarkerEventOutputTerminal, channel, out value); + } + /// + ///Use this attribute to specify the position of the event relative to the Sample clock. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetMarkerEventPosition(string channel, int value) + { + return SetInt32(niHSDIOProperties.MarkerEventPosition, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetMarkerEventPosition(string channel, out int value) + { + return GetInt32(niHSDIOProperties.MarkerEventPosition, channel, out value); + } + /// + ///Specifies the output polarity of the Marker event. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetMarkerEventPulsePolarity(string channel, int value) + { + return SetInt32(niHSDIOProperties.MarkerEventPulsePolarity, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetMarkerEventPulsePolarity(string channel, out int value) + { + return GetInt32(niHSDIOProperties.MarkerEventPulsePolarity, channel, out value); + } + /// + ///Specifies whether the Marker event terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetMarkerEventTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.MarkerEventTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetMarkerEventTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.MarkerEventTerminalConfiguration, channel, out value); + } + /// + ///Specifies the total number of records you want to acquire. + /// + /// + public int SetNumRecords(string channel, int value) + { + return SetInt32(niHSDIOProperties.NumRecords, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetNumRecords(string channel, out int value) + { + return GetInt32(niHSDIOProperties.NumRecords, channel, out value); + } + /// + ///Use this attribute to phase shift the PLL circuit of the On Board Clock source. You can use this attribute to align the Sample clock of this device with another device that shares the same Reference clock. This attribute is valid if NIHSDIO_ATTR_REF_CLOCK_SOURCE source is not set to NIHSDIO_VAL_NONE_STR. + /// For NI 6544/6545/6547/6548 devices, the valid range for this attribute is 0 to 65,535. + /// + /// + public int SetOscillatorPhaseDacValue(string channel, int value) + { + return SetInt32(niHSDIOProperties.OscillatorPhaseDacValue, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetOscillatorPhaseDacValue(string channel, out int value) + { + return GetInt32(niHSDIOProperties.OscillatorPhaseDacValue, channel, out value); + } + /// + ///Sets the pattern match mask for the Advance trigger. This attribute is used when NIHSDIO_ATTR_ADVANCE_TRIGGER_TYPE is set to NIHSDIO_VAL_PATTERN_MATCH. The pattern is a string of characters representing the entire pattern to be matched. Each character corresponds to a particular channel. + /// 'X': Match on any value + /// '1': Match on a logic 1 + /// '0': Match on a logic 0 + /// 'R' or 'r': Match on a rising edge + /// 'F' or 'f': Match on a falling edge + /// 'E' or 'e': Match on either edge + /// Spaces are ignored, and are useful for readability to segment long patterns. The rightmost character in the expression corresponds to the lowest numbered physical channel. + /// For example, "XXXX XXXX XXXX 1111 1100", specifies to match when channels 0 and 1 are '0' and channels 2-7 are '1'. The values seen by pattern matching are affected by NIHSDIO_ATTR_DATA_INTERPRETATION. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchAdvanceTriggerPattern(string channel, string value) + { + return SetString(niHSDIOProperties.PatternMatchAdvanceTriggerPattern, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchAdvanceTriggerPattern(string channel, out string value) + { + return GetString(niHSDIOProperties.PatternMatchAdvanceTriggerPattern, channel, out value); + } + /// + ///Specifies whether a pattern match Advance trigger asserts when a particular pattern is matched or not matched. + /// This attribute is valid only for acquisition tasks. + /// + /// + public int SetPatternMatchAdvanceTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.PatternMatchAdvanceTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchAdvanceTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PatternMatchAdvanceTriggerWhen, channel, out value); + } + /// + ///Sets the pattern match mask for the Pause trigger. This attribute is used when NIHSDIO_ATTR_PAUSE_TRIGGER_TYPE is set to NIHSDIO_VAL_PATTERN_MATCH. The pattern is a string of characters representing the entire pattern to be matched on. Each character corresponds to a particular channel. + /// 'X' or 'x': Match on any value + /// '1': Match on a logic 1 + /// '0': Match on a logic 0 + /// 'R' or 'r': Match on a rising edge + /// 'F' or 'f': Match on a falling edge + /// 'E' or 'e': Match on either edge + /// Spaces are ignored, and are useful for readability to segment long patterns. The rightmost character in the expression corresponds to the lowest numbered physical channel. + /// For example, "XXXX XXXX XXXX 1111 1100", specifies to match when channels 0 and 1 are '0' and channels 2-7 are '1'. The values seen by pattern matching are affected by NIHSDIO_ATTR_DATA_INTERPRETATION. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchPauseTriggerPattern(string channel, string value) + { + return SetString(niHSDIOProperties.PatternMatchPauseTriggerPattern, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchPauseTriggerPattern(string channel, out string value) + { + return GetString(niHSDIOProperties.PatternMatchPauseTriggerPattern, channel, out value); + } + /// + ///Specifies whether a pattern match Pause trigger asserts when a particular pattern is matched or not matched. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchPauseTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.PatternMatchPauseTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchPauseTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PatternMatchPauseTriggerWhen, channel, out value); + } + /// + ///Sets the pattern match mask for the Reference trigger. This attribute is used when NIHSDIO_ATTR_REF_TRIGGER_TYPE is set to NIHSDIO_VAL_PATTERN_MATCH. The pattern is a string of characters representing the entire pattern to be matched on. Each character corresponds to a particular channel. + /// 'X': Match on any value + /// '1': Match on a logic 1 + /// '0': Match on a logic 0 + /// 'R' or 'r': Match on a rising edge + /// 'F' or 'f': Match on a falling edge + /// 'E' or 'e': Match on either edge + /// Spaces are ignored, and are useful for readability to segment long patterns. The rightmost character in the expression corresponds to the lowest numbered physical channel. + /// For example, "XXXX XXXX XXXX 1111 1100", specifies to match when channels 0 and 1 are '0' and channels 2-7 are '1'. The values seen by pattern matching are affected by NIHSDIO_ATTR_DATA_INTERPRETATION. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchRefTriggerPattern(string channel, string value) + { + return SetString(niHSDIOProperties.PatternMatchRefTriggerPattern, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchRefTriggerPattern(string channel, out string value) + { + return GetString(niHSDIOProperties.PatternMatchRefTriggerPattern, channel, out value); + } + /// + ///Specifies whether a pattern match Reference trigger asserts when a particular pattern is matched or not matched. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchRefTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.PatternMatchRefTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchRefTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PatternMatchRefTriggerWhen, channel, out value); + } + /// + ///Sets the pattern match mask for the Start trigger. This attribute is used when NIHSDIO_ATTR_START_TRIGGER_TYPE is set to NIHSDIO_VAL_PATTERN_MATCH. The pattern is a string of characters representing the entire pattern to be matched. Each character corresponds to a particular channel. + /// 'X': Match on any value + /// '1': Match on a logic 1 + /// '0': Match on a logic 0 + /// 'R' or 'r': Match on a rising edge + /// 'F' or 'f': Match on a falling edge + /// 'E' or 'e': Match on either edge + /// Spaces are ignored, and are useful for readability to segment long patterns. The rightmost character in the expression corresponds to the lowest numbered physical channel. + /// For example, "XXXX XXXX XXXX 1111 1100", specifies to match when channels 0 and 1 are '0' and channels 2-7 are '1'. The values seen by pattern matching are affected by NIHSDIO_ATTR_DATA_INTERPRETATION. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetPatternMatchStartTriggerPattern(string channel, string value) + { + return SetString(niHSDIOProperties.PatternMatchStartTriggerPattern, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchStartTriggerPattern(string channel, out string value) + { + return GetString(niHSDIOProperties.PatternMatchStartTriggerPattern, channel, out value); + } + /// + ///Specifies whether a pattern match Start trigger asserts when a particular pattern is matched or not matched. + /// This attribute is valid only for acquisition tasks. + /// + /// + public int SetPatternMatchStartTriggerWhen(string channel, int value) + { + return SetInt32(niHSDIOProperties.PatternMatchStartTriggerWhen, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPatternMatchStartTriggerWhen(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PatternMatchStartTriggerWhen, channel, out value); + } + /// + ///Specifies the Pause trigger type. Depending upon the value of this attribute, you may need to set more attributes to fully configure the trigger. + /// + /// + public int SetPauseTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.PauseTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPauseTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PauseTriggerType, channel, out value); + } + /// + ///This attribute returns the maximum power your device has consumed since the last time this attribute was queried. Consuming more than 100% power disables the device. You can customize the voltage, data rate, and channel count of your specific application and use this attribute to ensure that the power consumption falls within the specifications listed in the NI 6555/6556 Specifications. To resume normal operation, you must clear the error condition by resetting the device. Valid values range from 0 to 100. Units are expressed as a percentage. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int GetPeakPowerConsumed(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DevicePeakPowerConsumed, channel, out value); + } + /// + ///This attribute returns the power consumed by your device at the time this attribute is queried. Consuming more than 100% power disables the device. You can customize the voltage, data rate, and channel count of your specific application and use this attribute to ensure that the power consumption falls within the specifications listed in the NI 6555/6556 Specifications. To resume normal operation, you must clear the error condition by resetting the device. Valid values range from 0 to 100. Units are expressed as a percentage. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int GetPowerConsumption(string channel, out double value) + { + return GetDouble(niHSDIOProperties.DevicePowerConsumption, channel, out value); + } + /// + ///Connects or disconnects, on the fly, all PPMU-capable channels on the DDC connector from the internal device pins. If you set this attribute to NIHSDIO_VAL_DISCONNECT, the PPMU-capable channels remain disconnected from the internal device pins until one of the following conditions occurs: + /// -This attribute is set to NIHSDIO_VAL_CONNECT. -The hardware reboots. -The niHSDIO_Reset or the niHSDIO_ResetDevice functions are called. -Self-calibration completes. + /// This attribute cannot configure channels on a per pin basis. It always configures all PPMU-capable channels on your device. Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetPpmuCapableIoSwitchControl(string channel, int value) + { + return SetInt32(niHSDIOProperties.PpmuCapableIoSwitchControl, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetPpmuCapableIoSwitchControl(string channel, out int value) + { + return GetInt32(niHSDIOProperties.PpmuCapableIoSwitchControl, channel, out value); + } + /// + ///Specifies the output polarity of the Ready for Advance event. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetReadyForAdvanceEventLevelActiveLevel(string channel, int value) + { + return SetInt32(niHSDIOProperties.ReadyForAdvanceEventLevelActiveLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForAdvanceEventLevelActiveLevel(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ReadyForAdvanceEventLevelActiveLevel, channel, out value); + } + /// + ///Specifies the destination terminal for the Ready for Advance event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetReadyForAdvanceEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ReadyForAdvanceEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForAdvanceEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ReadyForAdvanceEventOutputTerminal, channel, out value); + } + /// + ///Specifies whether the Ready for Advance event terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetReadyForAdvanceEventTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ReadyForAdvanceEventTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForAdvanceEventTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ReadyForAdvanceEventTerminalConfiguration, channel, out value); + } + /// + ///Specifies the output polarity of the Ready for Start event. + /// + /// + public int SetReadyForStartEventLevelActiveLevel(string channel, int value) + { + return SetInt32(niHSDIOProperties.ReadyForStartEventLevelActiveLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForStartEventLevelActiveLevel(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ReadyForStartEventLevelActiveLevel, channel, out value); + } + /// + ///Specifies the destination terminal for the Ready for Start Event. Event voltages and positions are only relevant if the destination of the event is a front panel connector. + /// + /// + public int SetReadyForStartEventOutputTerminal(string channel, string value) + { + return SetString(niHSDIOProperties.ReadyForStartEventOutputTerminal, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForStartEventOutputTerminal(string channel, out string value) + { + return GetString(niHSDIOProperties.ReadyForStartEventOutputTerminal, channel, out value); + } + /// + ///Specifies whether the Ready for Start event terminal is configured for single-ended or LVDS operation. Valid values for this attribute vary by device. Refer to your device documentation to determine if your hardware supports LVDS operation. + /// + /// + public int SetReadyForStartEventTerminalConfiguration(string channel, int value) + { + return SetInt32(niHSDIOProperties.ReadyForStartEventTerminalConfiguration, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetReadyForStartEventTerminalConfiguration(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ReadyForStartEventTerminalConfiguration, channel, out value); + } + /// + ///Returns the number of records that have been acquired. + /// + /// + public int GetRecordsDone(string channel, out int value) + { + return GetInt32(niHSDIOProperties.RecordsDone, channel, out value); + } + /// + ///Use this attribute to set the input impedance of the Reference clock when it is supplied through the front panel. This attribute is expressed in ohms. + /// Valid values are 50 or 1000. + /// + /// + public int SetRefClockImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.RefClockImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefClockImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.RefClockImpedance, channel, out value); + } + /// + ///Use this attribute to specify the Reference clock rate. Rate is expressed in Hertz. This attribute is ignored when NIHSDIO_ATTR_REF_CLOCK_SOURCE is set to "None". + /// Valid values for NI 6544/6545/6547/6548/6555/6556 devices are from 5 MHz to 100 MHz in 1 MHz steps. All other high-speed digital devices only support 10 MHz as a valid value. + /// + /// + public int SetRefClockRate(string channel, double value) + { + return SetDouble(niHSDIOProperties.RefClockRate, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefClockRate(string channel, out double value) + { + return GetDouble(niHSDIOProperties.RefClockRate, channel, out value); + } + /// + ///Use this attribute to specify the Reference clock source. + /// + /// + public int SetRefClockSource(string channel, string value) + { + return SetString(niHSDIOProperties.RefClockSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefClockSource(string channel, out string value) + { + return GetString(niHSDIOProperties.RefClockSource, channel, out value); + } + /// + ///Use this attribute to specify the amount of time until the next record's Reference trigger can be recognized. If the posttrigger time of the current record plus the pretrigger time of the next record (posttrigger record n + pretrigger record n+1 / frequency) is greater than this attribute, the holdoff value is ignored. + /// This attribute is especially useful when you want each device in a multidevice situation to recognize the Reference trigger at the same time, though the Reference trigger is shared among devices and each device has a different record size. + /// Reference to Reference Trigger Holdoff is expressed in seconds. + /// + /// + public int SetRefToRefTriggerHoldoff(string channel, double value) + { + return SetDouble(niHSDIOProperties.RefToRefTriggerHoldoff, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefToRefTriggerHoldoff(string channel, out double value) + { + return GetDouble(niHSDIOProperties.RefToRefTriggerHoldoff, channel, out value); + } + /// + ///Specifies the number of pretrigger samples to be acquired per record (for example, the samples acquired before the Reference trigger is received). The number of pretrigger samples cannot be greater than the value of NIHSDIO_SAMPLES_PER_RECORD. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetRefTriggerPretriggerSamples(string channel, int value) + { + return SetInt32(niHSDIOProperties.RefTriggerPretriggerSamples, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefTriggerPretriggerSamples(string channel, out int value) + { + return GetInt32(niHSDIOProperties.RefTriggerPretriggerSamples, channel, out value); + } + /// + ///Specifies the Reference trigger type. Depending on this attribute value, you may need to set more attributes to fully configure the trigger. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetRefTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.RefTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRefTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.RefTriggerType, channel, out value); + } + /// + ///Use this attribute to specify how many times to generate the waveform specified by NIHSDIO_ATTR_WAVEFORM_TO_GENERATE. This attribute is valid only when NIHSDIO_ATTR_REPEAT_MODE is set to NIHSDIO_VAL_FINITE; it is not used when the device is in continuous mode. This attribute is valid only when NIHSDIO_ATTR_GENERATION_MODE is set to NIHSDIO_VAL_WAVEFORM; it is ignored when in scripted mode. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetRepeatCount(string channel, int value) + { + return SetInt32(niHSDIOProperties.RepeatCount, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRepeatCount(string channel, out int value) + { + return GetInt32(niHSDIOProperties.RepeatCount, channel, out value); + } + /// + ///Use this attribute to specify whether or not to generate a single waveform continuously. This attribute is valid only when NIHSDIO_ATTR_GENERATION_MODE is set to NIHSDIO_VAL_WAVEFORM; it is not used when in scripted mode. If this attribute is set to NIHSDIO_VAL_FINITE, then use the NIHSDIO_ATTR_REPEAT_COUNT attribute to specify how many times the named waveform is generated. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetRepeatMode(string channel, int value) + { + return SetInt32(niHSDIOProperties.RepeatMode, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetRepeatMode(string channel, out int value) + { + return GetInt32(niHSDIOProperties.RepeatMode, channel, out value); + } + /// + ///Use this attribute to program the input impedance of the CLK IN connector when the Sample clock is supplied through the front panel. This attribute is expressed in ohms. + /// + /// + public int SetSampleClockImpedance(string channel, double value) + { + return SetDouble(niHSDIOProperties.SampleClockImpedance, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSampleClockImpedance(string channel, out double value) + { + return GetDouble(niHSDIOProperties.SampleClockImpedance, channel, out value); + } + /// + ///Use this attribute to specify the Sample clock rate, which controls the rate at which samples are acquired or generated when you use the Sample clock to time your application. The Sample clock rate is expressed in Hertz. + /// You must set this attribute even when you supply an external clock because NI-HSDIO uses this attribute for a number of reasons, including optimal error checking and certain pulse width selections. + /// If you have selected NIHSDIO_VAL_ONBOARD_CLOCK_STR as the value for the NIHSDIO_ATTR_SAMPLE_CLOCK_SOURCE attribute, getting this value shows how NI-HSDIO coerced the value. + /// + /// + public int SetSampleClockRate(string channel, double value) + { + return SetDouble(niHSDIOProperties.SampleClockRate, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSampleClockRate(string channel, out double value) + { + return GetDouble(niHSDIOProperties.SampleClockRate, channel, out value); + } + /// + ///Use this attribute to specify the Sample clock source. + /// STROBE is valid only for acquisition operations. + /// + /// + public int SetSampleClockSource(string channel, string value) + { + return SetString(niHSDIOProperties.SampleClockSource, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSampleClockSource(string channel, out string value) + { + return GetString(niHSDIOProperties.SampleClockSource, channel, out value); + } + /// + ///Specifies the number of samples to be acquired per record. If you are using a Reference trigger, this attribute includes both pretrigger and posttrigger samples. + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetSamplesPerRecord(string channel, int value) + { + return SetInt32(niHSDIOProperties.SamplesPerRecord, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSamplesPerRecord(string channel, out int value) + { + return GetInt32(niHSDIOProperties.SamplesPerRecord, channel, out value); + } + /// + ///Specifies whether the configured samples per record is finite (TRUE) or infinite (FALSE). + /// This attribute is valid only for acquisition sessions. + /// + /// + public int SetSamplesPerRecordIsFinite(string channel, bool value) + { + return SetBoolean(niHSDIOProperties.SamplesPerRecordIsFinite, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSamplesPerRecordIsFinite(string channel, out bool value) + { + return GetBoolean(niHSDIOProperties.SamplesPerRecordIsFinite, channel, out value); + } + /// + ///Use this attribute to specify which script in onboard memory is generated upon calling niHSDIO_Initiate when NIHSDIO_ATTR_GENERATION_MODE is NIHSDIO_VAL_SCRIPTED. If this attribute is not set to a valid script and more than one script is in onboard memory, you receive an error upon calling niHSDIO_Initiate. If only one script is in onboard memory and this attribute is set to empty string, you receive an error upon calling niHSDIO_Initiate. This attribute is ignored when NIHSDIO_ATTR_GENERATION_MODE is set to NIHSDIO_VAL_WAVEFORM, since NIHSDIO_ATTR_WAVEFORM_TO_GENERATE defines which waveform to generate. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetScriptToGenerate(string channel, string value) + { + return SetString(niHSDIOProperties.ScriptToGenerate, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetScriptToGenerate(string channel, out string value) + { + return GetString(niHSDIOProperties.ScriptToGenerate, channel, out value); + } + /// + ///Specifies the Script trigger type. Depending upon the value of this attribute, more attributes may be needed to fully configure the trigger. Valid values for this attribute are Digital Edge, Digital Level, and Software. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetScriptTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.ScriptTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetScriptTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.ScriptTriggerType, channel, out value); + } + /// + ///Returns the device serial number. + /// + /// + public int GetSerialNumber(string channel, out string value) + { + return GetString(niHSDIOProperties.SerialNumber, channel, out value); + } + /// + ///Specifies the space available (in samples) in the streaming waveform for writing new data. + /// This attribute is valid only when streaming. + /// + /// + public int GetSpaceAvailableInStreamingWaveform(string channel, out int value) + { + return GetInt32(niHSDIOProperties.SpaceAvailableInStreamingWaveform, channel, out value); + } + /// + ///Use this attribute to specify the amount of time after a Start trigger before a Reference trigger can be recognized. If the pretrigger time (pretrigger samples / frequency) is greater than this attribute, the holdoff value is ignored. + /// This attribute is especially useful when you want each device in a multidevice situation to recognize the Reference trigger at the same time, though the Reference trigger is shared among devices and each device has a different pretrigger count. + /// Start to Reference Trigger Holdoff is expressed in seconds. + /// + /// + public int SetStartToRefTriggerHoldoff(string channel, double value) + { + return SetDouble(niHSDIOProperties.StartToRefTriggerHoldoff, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStartToRefTriggerHoldoff(string channel, out double value) + { + return GetDouble(niHSDIOProperties.StartToRefTriggerHoldoff, channel, out value); + } + /// + ///Use this attribute to specify whether you want the Start trigger to be a digital edge, pattern match, or software trigger. You can also choose NIHSDIO_VAL_NONE as the value for this attribute. + /// + /// + public int SetStartTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.StartTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStartTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.StartTriggerType, channel, out value); + } + /// + ///Assigns channels for static operation. The group of static channels is changed each time this attribute is set. For example, setting this attribute to "0-10" and then setting it to "5-8" results in only channels 5-8 being assigned to static. Channels 0-4 and 9-10 are unconfigured by the second configuration. Writing an empty string to this attribute configures ALL channels for static. Writing the value "None" removes all channels from static operation. The channel is not changed until a call to niHSDIO_ReadStaticU32 (for acquisition sessions) or niHSDIO_WriteStaticU32 (for generation sessions). + /// You can configure a channel for more than one simultaneous operation. A channel can be simultaneously configured for the following operations: + /// - Dynamic generation and any (static and/or dynamic) acquisition + /// - Static generation and any (static and/or dynamic) acquisition + /// - Both static and dynamic acquisition + /// NOTE: You cannot configure a particular channel for simultaneous dynamic and static generation. + /// Unconfiguring a static generation channel frees that channel to be reconfigured for dynamic generation. Unconfiguring a static generation channel does not stop the channel from driving its current value any static value already written to the channel continues to be driven. + /// Syntax examples: + /// "2-15" or "15-2" set channels 2 through 15 for static operation + /// "0, 3, 10" or "3, 10, 0" set channels 0, 3, and 10 for static operation + /// "" (empty string) sets all channels for static operation + /// "None" removes all channels from static operation. + /// + /// + public int SetStaticChannels(string channel, string value) + { + return SetString(niHSDIOProperties.StaticChannels, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStaticChannels(string channel, out string value) + { + return GetString(niHSDIOProperties.StaticChannels, channel, out value); + } + /// + ///Use this attribute to specify whether you want the Stop trigger to be a digital edge or software trigger. You can also choose NIHSDIO_VAL_NONE as the value for this attribute. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetStopTriggerType(string channel, int value) + { + return SetInt32(niHSDIOProperties.StopTriggerType, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStopTriggerType(string channel, out int value) + { + return GetInt32(niHSDIOProperties.StopTriggerType, channel, out value); + } + /// + ///Enables streaming of data from host memory to the device. + /// This attribute is valid only for dynamic generation sessions. + /// + /// + public int SetStreamingEnabled(string channel, bool value) + { + return SetBoolean(niHSDIOProperties.StreamingEnabled, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStreamingEnabled(string channel, out bool value) + { + return GetBoolean(niHSDIOProperties.StreamingEnabled, channel, out value); + } + /// + ///Specifies the name of the waveform for streaming. Use this attribute in conjunction with the NIHSDIO_ATTR_STREAMING_ENABLED attribute. + /// NOTE: You cannot stream an unnamed waveform. + /// + /// + public int SetStreamingWaveformName(string channel, string value) + { + return SetString(niHSDIOProperties.StreamingWaveformName, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetStreamingWaveformName(string channel, out string value) + { + return GetString(niHSDIOProperties.StreamingWaveformName, channel, out value); + } + /// + ///Configures the supported digital data states in a waveform. Use this attribute to enable tristate data generation or real-time hardware compare data. To use the hardware comparison feature you must have an acquisition and a generation session running concurrently. When you select hardware compare data, you must set this attribute to the same value in both sessions. + /// NOTE: For NI 6547/6548 devices, when you set this attribute to an extended data mode it reduces the number of channels available for dynamic generation to 24. The top eight channels (24 to 31) are available for dynamic acquisition or static generation, and the lower twenty-four channels (0 to 23) are available for dynamic generation of supported data states. + /// When you set this attribute to NIHSDIO_VAL_STATES_L_H_X, all data is configured for comparison. When you set this attribute to NIHSDIO_VAL_STATES_0_1_Z_L_H_X, the software is configured for either driving generation data or comparing data. + /// Use the niHSDIO_WriteNamedWaveformWDT function to write expected data to the device. The device drives any values of 0, 1, or Z in the waveform, while values of H, L, or X are treated as expected data values. + /// You must set this attribute before you write data or allocate a waveform to the device. + /// + /// + public int SetSupportedDataStates(string channel, int value) + { + return SetInt32(niHSDIOProperties.SupportedDataStates, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetSupportedDataStates(string channel, out int value) + { + return GetInt32(niHSDIOProperties.SupportedDataStates, channel, out value); + } + /// + ///Returns the total onboard memory size, in samples, for acquiring data. The number of samples is based on the default device data width. + /// If you configure your device to use a different data width, the total memory size is actually the value returned by this attribute multiplied by the quotient of the default data width divided by the configured data width. For example, if you configure 1-byte data width for a 2-byte device, the total acquisition memory size is twice the number of samples that is returned by this attribute. + /// + /// + public int GetTotalAcquisitionMemorySize(string channel, out int value) + { + return GetInt32(niHSDIOProperties.TotalAcquisitionMemorySize, channel, out value); + } + /// + ///Returns the total onboard memory size, in samples, for generating data. The number of samples is based on the default device data width. + /// If you configure your device to use a different data width, the total memory size is actually the value returned by this attribute multiplied by the quotient of the default data width divided by the configured data width. For example, if you configure 1-byte data width for a 2-byte device, the total generation memory size is twice the number of samples that is returned by this attribute. + /// + /// + public int GetTotalGenerationMemorySize(string channel, out int value) + { + return GetInt32(niHSDIOProperties.TotalGenerationMemorySize, channel, out value); + } + /// + ///This attribute specifies, per channel, the fixed time delay after the Sample clock rising edge when the device samples on a trigger. The value of this attribute is added to the value of the NIHSDIO_ATTR_TRIGGER_POSITION_DELAY attribute to determine the total delay. Unlike the NIHSDIO_ATTR_TRIGGER_POSITION_DELAY attribute, this attribute is specified in seconds. Valid values, in seconds, depend on your clock rate and are represented by the equation 2(1/f) to +3(1/f), where f is the frequency of your clock rate. The default value is 0. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetTriggerDeskew(string channel, double value) + { + return SetDouble(niHSDIOProperties.TriggerDeskew, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetTriggerDeskew(string channel, out double value) + { + return GetDouble(niHSDIOProperties.TriggerDeskew, channel, out value); + } + /// + ///This attribute specifies, per channel, the delay after the Sample clock rising edge when the device samples on a trigger. Trigger delay is expressed as a fraction of the clock period (for example, a fraction of 1/Sample clock rate). Valid values range from 1 to 2 clock cycles in increments of 0.001 cycles. The default value is 0. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetTriggerPositionDelay(string channel, double value) + { + return SetDouble(niHSDIOProperties.TriggerPositionDelay, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetTriggerPositionDelay(string channel, out double value) + { + return GetDouble(niHSDIOProperties.TriggerPositionDelay, channel, out value); + } + /// + ///This attribute sets the high trigger voltage level for the session. If you do not explicitly set this attribute, NI-HSDIO assumes the same value as NIHSDIO_ATTR_DATA_VOLTAGE_HIGH_LEVEL for the acquisition session. + /// For NI 6555/6556 devices, this attribute is subject to the following restrictions: this attribute is supported only in acquisition sessions, only PFI 1 and PFI 2 support this attribute (PFI 0, PFI 3, and PFI 24-31 are always set to the 3.3V logic family), valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_TRIGGER_VOLTAGE_RANGE attribute, and the default value is 1.7 V. + /// + /// + public int SetTriggerVoltageHighLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.TriggerVoltageHighLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetTriggerVoltageHighLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.TriggerVoltageHighLevel, channel, out value); + } + /// + ///This attribute sets the low trigger voltage level for the session. If you do not explicitly set this attribute, NI-HSDIO assumes the same value as NIHSDIO_ATTR_DATA_VOLTAGE_LOW_LEVEL for the acquisition session. + /// For NI 6555/6556 devices, this attribute is subject to the following restrictions: this attribute is supported only in acquisition sessions, only PFI 1 and PFI 2 support this attribute (PFI 0, PFI 3, and PFI 24-31 are always set to the 3.3V logic family), valid values range from 2 to 7, depending on the range selected with the NIHSDIO_ATTR_TRIGGER_VOLTAGE_RANGE attribute, and the default value is 1.6 V. + /// + /// + public int SetTriggerVoltageLowLevel(string channel, double value) + { + return SetDouble(niHSDIOProperties.TriggerVoltageLowLevel, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetTriggerVoltageLowLevel(string channel, out double value) + { + return GetDouble(niHSDIOProperties.TriggerVoltageLowLevel, channel, out value); + } + /// + ///This attribute specifies the voltage range used for all trigger voltages on all PFI channels that support voltage configuration. Only PFI 1 and PFI 2 support voltage configuration. This attribute is valid only for acquisition sessions. + /// NOTE: Only NI 6555/6556 devices support this attribute. + /// + /// + public int SetTriggerVoltageRange(string channel, int value) + { + return SetInt32(niHSDIOProperties.TriggerVoltageRange, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetTriggerVoltageRange(string channel, out int value) + { + return GetInt32(niHSDIOProperties.TriggerVoltageRange, channel, out value); + } + /// + ///Use this attribute to specify which named waveform in onboard memory is generated upon calling niHSDIO_Initiate when NIHSDIO_ATTR_GENERATION_MODE is NIHSDIO_VAL_WAVEFORM. If this attribute is not set to a valid waveform name and more than one waveform is in onboard memory, you receive an error when calling niHSDIO_Initiate. If only one waveform is in onboard memory and this attribute is set to empty string, then that waveform is generated upon calling niHSDIO_Initiate. This attribute is ignored when NIHSDIO_ATTR_GENERATION_MODE is set to NIHSDIO_VAL_SCRIPTED, since NIHSDIO_ATTR_SCRIPT_TO_GENERATE defines the sequence of waveforms to generate. + /// This attribute is valid only for generation sessions. + /// + /// + public int SetWaveformToGenerate(string channel, string value) + { + return SetString(niHSDIOProperties.WaveformToGenerate, channel, value); + } + /// + /// + /// + /// + /// + /// + public int GetWaveformToGenerate(string channel, out string value) + { + return GetString(niHSDIOProperties.WaveformToGenerate, channel, out value); + } + + + #endregion + + #region Added in 2.0 + + + /// + /// Writes data to PFI channels configured for + /// static generation. The least significant bit of writeData corresponds to the + /// lowest physical PFI channel number. + /// You can configure a channel for static generation using the + /// niHSDIO_AssignStaticChannels function. + /// Note  NI-HSDIO returns an error if an event is already routed to a PFI channel and you try to reserve that same channel for static use with this function. + /// + /// + /// + /// Specifies the bit-value of data to drive on channels configured for static generation. 1 + /// corresponds to logic high, 0 corresponds to logic low. + /// The least significant bit of writeData corresponds to the + /// lowest physical channel number (for example, writeData + /// of 0xFF00 means set the lower eight channels to 0, while setting the upper eight + /// channels to logic high. + /// Data values in writeData + /// corresponding to channels not configured for static generation are ignored. + /// Static channels explicitly disabled with the niHSDIO_TristateChannels + /// function remain disabled, but the channel data value changes internally. Re-enabling + /// a channel with niHSDIO_TristateChannels causes the + /// channel to drive any value that you have written to it, even while the channel was + /// disabled. + /// + /// + /// + /// Specifies the bit-value of PFI channels to leave unchanged. 1 means to change the PFI channel to whatever is reflected by writeData. 0 means do not alter the PFI channel, regardless of writeData. + /// The least significant bit of channelMask corresponds to the lowest physical PFI channel number (for example, writeData of 0xFFFF and channelMask of 0x0001 means set only PFI0 to 1; all other channels remain unchanged). + /// + /// + /// + /// + ///niHSDIO_WriteStaticPFIU32 + /// ViStatus = niHSDIO_WriteStaticPFIU32 ( + /// ViSession vi, ViUInt32 writeData, + /// ViUInt32 channelMask); + /// Purpose + /// Writes data to PFI channels configured for + /// static generation. The least significant bit of writeData corresponds to the + /// lowest physical PFI channel number. + /// You can configure a channel for static generation using the + /// niHSDIO_AssignStaticChannels function. + /// Note  NI-HSDIO returns an error if an event is already routed to a PFI channel and you try to reserve that same channel for static use with this function. + /// + /// + public int WriteStaticPFIU32(uint writeData, uint channelMask) + { + int pInvokeResult = PInvoke.WriteStaticPFIU32(this._handle, writeData, channelMask); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Immediately reads all PFI channels configured for static acquisition. The least significant bit of read data corresponds to the lowest physical PFI channel number. Configure a channel for static acquisition using + /// the niHSDIO_AssignStaticChannels function. + /// Channels not configured for static acquisition return a zero.Values obtained + /// from static read operations are affected by data interpretation. + /// Related topics: Acquiring or Generating Static Data + /// + /// + /// + /// Specifies the bit-value of data read from PFI channels configured for static acquisition. + /// The least significant bit of readData corresponds to the lowest physical channel number. For example, bit 0 corresponds to PFI0, and bit 31 corresponds to PFI31, if that channel exists on the hardware. + /// If readData returns a value of 0x000F, channels PFI0 to PFI3 are logic one and the remaining channels are logic zero or are not configured for static acquisition. + /// If readData returns a value of 0xFF00 0000, channels PFI24 to PFI31 are logic one and the remaining channels are zero or are not configured for acquisition. + /// + /// + /// + /// + ///niHSDIO_ReadStaticPFIU32 + /// ViStatus = niHSDIO_ReadStaticPFIU32 ( + /// ViSession vi, + /// ViUInt32 *readData); + /// Purpose + /// Immediately reads all PFI channels configured for static acquisition. The least significant bit of read data corresponds to the lowest physical PFI channel number. Configure a channel for static acquisition using + /// the niHSDIO_AssignStaticChannels function. + /// Channels not configured for static acquisition return a zero.Values obtained + /// from static read operations are affected by data interpretation. + /// Related topics: Acquiring or Generating Static Data + /// + /// + public int ReadStaticPFIU32(out uint readData) + { + int pInvokeResult = PInvoke.ReadStaticPFIU32( + this._handle, + out readData); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Advance trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the pattern parameter on consecutive clock cycles. After the last pattern element in the pattern parameter is matched, the Advance trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary Making Multirecord Acquisitions + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the pattern string. + /// + /// + /// + /// Specifies the binary multi-sample pattern that activates the pattern match trigger. Samples are separated by commas, and each sample is composed of the following characters: + /// X or x: Ignore the channel + /// 1: Match on a logic 1 + /// 0: Match on a logic 0 + /// R or r: Match on a rising edge + /// F or f: Match on a falling edge + /// E or e: Match on either edge + /// Note  R, F, and E are supported only on the first sample. + /// The first character in the expression corresponds to the first channel in channelList. The number of characters in each sample must + /// correspond to the number of channels specified in channelList or an error is returned. + /// For example, the following two examples are valid and achieve the same results: + /// channelList = 19-0 and pattern = 0000 0XXX XX11 1111 1111channelList = 0-19 and pattern = 1111 1111 11XX XXX0 0000 + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0"x, + /// Sample 1 1, + /// Sample ... ... + /// Sample 8 0, + /// Sample 91" + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0"0000 0000 0000 0000 0000, + /// Sample 1 1111 1111 1111 1111 0000, + /// Sample ... ... + /// Sample 8 0000 1111 1111 1111 1111, + /// Sample 9 1111 1111 11XX XXX0 0000" + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTrigger + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTrigger ( + /// ViSession vi, + /// ViConstString channelList, + /// VisConstString pattern); + /// Purpose + /// Configures the Advance trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the pattern parameter on consecutive clock cycles. After the last pattern element in the pattern parameter is matched, the Advance trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary Making Multirecord Acquisitions + /// + /// + public int ConfigureMultiSamplePatternMatchAdvanceTrigger(string channelList, string pattern) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchAdvanceTrigger( + this._handle, channelList, pattern); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Advance trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the patternArray parameter is matched, the Advance trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary Making Multirecord Acquisitions + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the patternArray string. + /// + /// + /// + /// Specifies the binary multi-sample pattern that activates the pattern match trigger. + /// Bits on channels not specified in channelList are ignored. + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0 + /// 0x0 + /// Sample 1 0x1 Sample ... ... + /// Sample 8 + /// 0x0 + /// Sample 9 + /// 0x1 + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0 0xABCDE + /// Sample 1 0xFFFFF + /// Sample ... ... + /// Sample 8 0xFFFFF + /// Sample 90xABCDE + /// + /// + /// + /// Specifies the number of patterns in the patternArray. + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTriggerU32 + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTriggerU32 ( + /// ViSession vi, + /// ViConstString channelList, + /// ViUInt32 patternArray[], + /// ViInt32 numberOfPatterns); + /// Purpose + /// Configures the Advance trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the patternArray parameter is matched, the Advance trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary Making Multirecord Acquisitions + /// + /// + public int ConfigureMultiSamplePatternMatchAdvanceTriggerU32(string channelList, uint[] patternArray, int numberOfPatterns) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchAdvanceTriggerU32( + this._handle, channelList, patternArray, numberOfPatterns); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Reference trigger + /// for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this + /// function. For the channels specified in the channelList parameter, the pattern must match each pattern element + /// specified in the pattern parameter on consecutive clock cycles. After the last pattern element in the pattern parameter is matched, the Reference trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the pattern string. + /// + /// + /// + /// Specifies the binary multi-sample pattern that activates the pattern match trigger. Samples are separated by commas, and each sample is composed of the following characters: + /// X or x: Ignore the channel + /// 1: Match on a logic 1 + /// 0: Match on a logic 0 + /// R or r: Match on a rising edge + /// F or f: Match on a falling edge + /// E or e: Match on either edge + /// Note  R, F, and E are supported only on the first sample. + /// The first character in the expression corresponds to the first channel in channelList. The number of characters in each sample must + /// correspond to the number of channels specified in channelList or an error is returned. + /// For example, the following two examples are valid and achieve the same results: + /// channelList = 19-0 and pattern = 0000 0XXX XX11 1111 1111channelList = 0-19 and pattern = 1111 1111 11XX XXX0 0000 + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0"x, + /// Sample 1 1, + /// Sample ... ... + /// Sample 8 0, + /// Sample 91" + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0"0000 0000 0000 0000 0000, + /// Sample 1 1111 1111 1111 1111 0000, + /// Sample ... ... + /// Sample 8 0000 1111 1111 1111 1111, + /// Sample 9 1111 1111 11XX XXX0 0000" + /// + /// + /// + /// Specifies the number of necessary pretrigger samples before the Reference trigger is acknowledged. + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchRefTrigger + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchRefTrigger ( + /// ViSession vi, + /// ViConstString channelList, + /// ViConstString pattern, + /// ViInt32 pretrigSamples); + /// Purpose + /// Configures the Reference trigger + /// for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this + /// function. For the channels specified in the channelList parameter, the pattern must match each pattern element + /// specified in the pattern parameter on consecutive clock cycles. After the last pattern element in the pattern parameter is matched, the Reference trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + public int ConfigureMultiSamplePatternMatchRefTrigger(string channelList, string pattern, int pretriggerSamples) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchRefTrigger( + this._handle, channelList, pattern, pretriggerSamples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Reference trigger + /// for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this + /// function. For the channels specified in the channelList parameter, the pattern must match each pattern element + /// specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the + /// patternArray parameter is matched, the Reference trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the patternArray string. + /// + /// + /// + /// Specifies the binary multi-sample pattern that activates the pattern match trigger. + /// Bits on channels not specified in channelList are ignored. + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0 + /// 0x0 + /// Sample 1 0x1 Sample ... ... + /// Sample 8 + /// 0x0 + /// Sample 9 + /// 0x1 + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0 0xABCDE + /// Sample 1 0xFFFFF + /// Sample ... ... + /// Sample 8 0xFFFFF + /// Sample 90xABCDE + /// + /// + /// + /// Specifies the number of patterns in the patternArray. + /// + /// + /// + /// Specifies the number of necessary pretrigger samples before the Reference trigger is acknowledged. + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchRefTriggerU32 + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchRefTriggerU32 ( + /// ViSession vi, + /// ViConstString channelList, + /// ViUInt32 patternArray[], + /// ViInt32 numberOfPatterns, + /// ViInt32 pretrigSamples); + /// Purpose + /// Configures the Reference trigger + /// for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this + /// function. For the channels specified in the channelList parameter, the pattern must match each pattern element + /// specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the + /// patternArray parameter is matched, the Reference trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + public int ConfigureMultiSamplePatternMatchRefTriggerU32(string channelList, uint[] patternArray, int numberOfPatterns, int pretriggerSamples) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchRefTriggerU32( + this._handle, channelList, patternArray, numberOfPatterns, pretriggerSamples); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Start trigger for multi-sample pattern match triggering. + /// You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the + /// channelList parameter, the pattern must match each pattern element specified in the pattern parameter + /// on consecutive clock cycles. + /// After the last pattern element in the pattern parameter is matched, the Start trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the pattern string. + /// + /// + /// + /// Specifies the binary multi-sample pattern that activates the pattern match trigger. Samples are separated by commas, and each sample is composed of the following characters: + /// X or x: Ignore the channel + /// 1: Match on a logic 1 + /// 0: Match on a logic 0 + /// R or r: Match on a rising edge + /// F or f: Match on a falling edge + /// E or e: Match on either edge + /// Note  R, F, and E are supported only on the first sample. + /// The first character in the expression corresponds to the first channel in channelList. The number of characters in each sample must + /// correspond to the number of channels specified in channelList or an error is returned. + /// For example, the following two examples are valid and achieve the same results: + /// channelList = 19-0 and pattern = 0000 0XXX XX11 1111 1111channelList = 0-19 and pattern = 1111 1111 11XX XXX0 0000 + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0"x, + /// Sample 1 1, + /// Sample ... ... + /// Sample 8 0, + /// Sample 91" + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0"0000 0000 0000 0000 0000, + /// Sample 1 1111 1111 1111 1111 0000, + /// Sample ... ... + /// Sample 8 0000 1111 1111 1111 1111, + /// Sample 9 1111 1111 11XX XXX0 0000" + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchStartTrigger + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchStartTrigger ( + /// ViSession vi, + /// ViConstString channelList, + /// ViConstString pattern); + /// Purpose + /// Configures the Start trigger for multi-sample pattern match triggering. + /// You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the + /// channelList parameter, the pattern must match each pattern element specified in the pattern parameter + /// on consecutive clock cycles. + /// After the last pattern element in the pattern parameter is matched, the Start trigger is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// Related topics: Triggers Summary + /// + /// + public int ConfigureMultiSamplePatternMatchStartTrigger(string channelList, string pattern) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchStartTrigger( + this._handle, channelList, pattern); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Start trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the patternArray is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// + /// + /// + /// This string specifies which channels are configured for pattern matching + /// using the pattern string. The order of channels in the list determines the order of + /// the patternArray string. + /// + /// + /// + /// The binary multi-sample pattern that activates the pattern match trigger. + /// Bits on channels not specified in channelList are ignored. + /// The following example searches for ten consecutive samples on channel 0: + /// Sample 0 + /// 0x0 + /// Sample 1 0x1 Sample ... ... + /// Sample 8 + /// 0x0 + /// Sample 9 + /// 0x1 + /// The following example searches for ten consecutive samples on channels 0 to 19: + /// Sample 0 0xABCDE + /// Sample 1 0xFFFFF + /// Sample ... ... + /// Sample 8 0xFFFFF + /// Sample 90xABCDE + /// + /// + /// + /// Specifies the number of patterns in the patternArray. + /// + /// + /// + /// + ///niHSDIO_ConfigureMultiSamplePatternMatchStartTriggerU32 + /// ViStatus = niHSDIO_ConfigureMultiSamplePatternMatchStartTriggerU32 ( + /// ViSession vi, + /// ViConstString channelList, + /// ViUInt32 patternArray[], + /// ViInt32 numberOfPatterns); + /// Purpose + /// Configures the Start trigger for multi-sample pattern match triggering. You can configure up to 32 channels with patterns of up to 10 samples per channel with this function. For the channels specified in the channelList parameter, the pattern must match each pattern element specified in the patternArray parameter on consecutive clock cycles. After the last pattern element in the patternArray is asserted. + /// This function is valid only for acquisition sessions. + /// Note   This function is only supported for the following devices: + /// NI 6544/6545/6547/6548/6555/6556. + /// + /// + public int ConfigureMultiSamplePatternMatchStartTriggerU32(string channelList, uint[] patternArray, int numberOfPatterns) + { + int pInvokeResult = PInvoke.ConfigureMultiSamplePatternMatchStartTriggerU32( + this._handle, channelList, patternArray, numberOfPatterns); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the internal routing of the + /// specified channel(s) so that you can perform specific calibration steps. + /// + /// + /// + /// Identifies the channel on which to modify the internal routing. + /// + /// + /// + /// Identifies which section of the external calibration procedure you are trying to execute. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// Identifies which internal routing path to configure based on the Calibration Type. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// + ///niHSDIO_CalConfigureChannelState + /// ViStatus = niHSDIO_CalConfigureChannelState ( + /// ViSession vi, + /// ViConstString channel, + /// ViUInt32 calibrationType, + /// ViUInt32 calibrationReference); + /// Purpose + /// Configures the internal routing of the + /// specified channel(s) so that you can perform specific calibration steps. + /// + /// + public int CalConfigureChannelState(string channel, uint calibrationType, uint calibrationReference) + { + int pInvokeResult = PInvoke.CalConfigureChannelState( + this._handle, channel, calibrationType, calibrationReference); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the internal routing of the device + /// so that you can perform specific calibration steps. + /// + /// + /// + /// Selects whether to access the PMU pins on the AUX I/O connector or the REMOTE SENSE connector. + /// Defined Values + /// NIHSDIO_VAL_STPMU_AUX_IO_CONNECTOR (94)—Accesses the PMU pins on the AUX I/O connector. This is the default value. + /// NIHSDIO_VAL_STPMU_REMOTE_SENSE_CONNECTOR (95)—Accesses the PMU pins on the REMOTE SENSE connector. + /// + /// + /// + /// Identifies which section of the external calibration procedure you are trying to execute. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// Identifies which internal routing path to configure based on the Calibration Type. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// + ///niHSDIO_CalConfigureDeviceState + /// ViStatus =niHSDIO_CalConfigureDeviceState ( + /// ViSession vi, + /// ViInt32 connector, + /// ViUInt32 calibrationType, + /// ViUInt32 calibrationReference); + /// Purpose + /// Configures the internal routing of the device + /// so that you can perform specific calibration steps. + /// + /// + public int CalConfigureDeviceState(int connector, uint calibrationType, uint calibrationReference) + { + int pInvokeResult = PInvoke.CalConfigureDeviceState( + this._handle, connector, calibrationType, calibrationReference); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Takes a single floating point value as input and performs internal calculations based on this value, previous inputs, the Calibration Reference, and the Calibration Type. + /// + /// + /// + /// Identifies the channel to adjust. + /// + /// + /// + /// Identifies which section of the external calibration procedure you are trying to execute. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// Identifies which internal routing path to configure based on the calibration type. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// Specifies the floating point value used to perform internal calculations. + /// + /// + /// + /// + ///niHSDIO_CalAdjustViReal64 + /// ViStatus = niHSDIO_CalAdjustViReal64 ( + /// ViSession vi, + /// ViConstString channel, + /// ViUInt32 calibrationType, + /// ViUInt32 calibrationReference, + /// ViReal64 value); + /// Purpose + /// Takes a single floating point value as input and performs internal calculations based on this value, previous inputs, the Calibration Reference, and the Calibration Type. + /// + /// + public int CalAdjustViReal64(string channel, uint calibrationType, uint calibrationReference, double value) + { + int pInvokeResult = PInvoke.CalAdjustViReal64( + this._handle, channel, calibrationType, calibrationReference, value); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Takes an array of floating point values as input and performs internal calculations based on these values, previous inputs, the Calibration Reference, and the Calibration Type. + /// + /// + /// + /// Identifies the channel to adjust. + /// + /// + /// + /// Identifies which section of the external calibration procedure you are trying to execute. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// Identifies which internal routing path to configure based on the calibration type. Refer to the calibration procedure document for your device for the correct value to use. + /// + /// + /// + /// The number of values used in the Value array passed into this function. + /// + /// + /// + /// specifies the floating point values used to perform internal calculations. + /// + /// + /// + /// + ///niHSDIO_CalAdjustViReal64Array + /// ViStatus = niHSDIO_CalAdjustViReal64Array ( + /// ViSession vi, + /// ViConstString channel, + /// ViUInt32 calibrationType, + /// ViUInt32 calibrationReference, + /// ViInt32 numberOfValues, + /// ViReal64 values[]); + /// Purpose + /// Takes an array of floating point values as input and performs internal calculations based on these values, previous inputs, the Calibration Reference, and the Calibration Type. + /// + /// + public int CalAdjustViReal64Array(string channel, uint calibrationType, uint calibrationReference, int numberofValues, double[] value) + { + int pInvokeResult = PInvoke.CalAdjustViReal64Array( + this._handle, channel, calibrationType, calibrationReference, numberofValues, value); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Restores the internal routing of the device to the default, unconfigured state. + /// + /// + /// + /// + ///niHSDIO_CalClearState + /// ViStatus = niHSDIO_CalClearState ( + /// ViSession vi); + /// Purpose + /// Restores the internal routing of the device to the default, unconfigured state. + /// + /// + public int CalClearState() + { + int pInvokeResult = PInvoke.CalClearState( + this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Closes the child session of the open external calibration session, + /// similar to niHSDIO_close. + /// If any open child sessions have not been closed when + /// niHSDIO_CloseExtCal is called, they are closed implicitly. + /// + /// + /// + /// Identifies the niHSDIO Acquisition or Generation session that is created by the calibration session for the purpose of measurement. You can create one acquisition and/or one generation session at a time within the calibration session. + /// + /// + /// + /// + ///niHSDIO_CalCloseChildSession + /// ViStatus = niHSDIO_CalCloseChildSession ( + /// ViSession vi, + /// ViSession child); + /// Purpose + /// Closes the child session of the open external calibration session, + /// similar to niHSDIO_close. + /// If any open child sessions have not been closed when + /// niHSDIO_CloseExtCal is called, they are closed implicitly. + /// + /// + public int CalCloseChildSession(System.IntPtr childSession) + { + int pInvokeResult = PInvoke.CalCloseChildSession( + this._handle, childSession); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Creates a new acquisition or generation session within an existing External Calibration session, based on the specified session type. This function returns a handle to the new child session. + /// Note  An error occurs if another child session of the same type is already open. + /// + /// + /// + /// The type of session, either Acquisition or Generation. + /// + /// + /// + /// Identifies the niHSDIO Acquisition or Generation session that is created by the calibration session for the purpose of measurement. You can create one acquisition and/or one generation session at a time within the calibration session. + /// + /// + /// + /// + ///niHSDIO_CalInitChildSession + /// ViStatus = niHSDIO_CalInitChildSession ( + /// ViSession vi, + /// ViUInt8 sessionType, + /// ViSession *childSession); + /// Purpose + /// Creates a new acquisition or generation session within an existing External Calibration session, based on the specified session type. This function returns a handle to the new child session. + /// Note  An error occurs if another child session of the same type is already open. + /// + /// + public int CalInitChildSession(byte sessiontype, out IntPtr childsession) + { + int pInvokeResult = PInvoke.CalInitChildSession( + this._handle, sessiontype, + out childsession); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Returns the current onboard temperature for the device. + /// + /// + /// + /// Retuns the current onboard temperature of the device in degrees Celsius. + /// + /// + /// + /// + ///niHSDIO_ReadCurrentTemperature + /// ViStatus =niHSDIO_ReadCurrentTemperature ( + /// ViSession vi, + /// ViReal64* temp); + /// Purpose + /// Returns the current onboard temperature for the device. + /// + /// + public int ReadCurrentTemperature(out double temperature) + { + int pInvokeResult = PInvoke.ReadCurrentTemperature( + this._handle, + out temperature); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + #endregion + + #region Added in 15.0 + + /// + /// Configures the Stop trigger for edge triggering. This function is valid only for generation sessions. + /// + /// + /// You may specify any valid source terminal for this trigger. Trigger voltages and positions are + /// only relevant if the source of the trigger is from the front panel connectors. + /// + /// + /// Specifies the edge to detect. + /// + /// + /// + /// + ///niHSDIO_ConfigureDigitalEdgeStopTrigger + ///ViStatus = niHSDIO_ConfigureDigitalEdgeStopTrigger ( ViSession vi, ViConstString source, ViInt32 edge); + ///Purpose + ///Configures the Stop trigger for edge triggering. This function is valid only for generation sessions. + /// + /// + public int ConfigureDigitalEdgeStopTrigger(string Source, int Edge) + { + int pInvokeResult = PInvoke.ConfigureDigitalEdgeStopTrigger( + this._handle, Source, Edge); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Configures the Stop trigger for software triggering. + /// + /// + /// niHSDIO_ConfigureSoftwareStopTrigger + /// ViStatus = niHSDIO_ConfigureSoftwareStopTrigger ( ViSession vi); + /// Purpose + /// Configures the Stop trigger for software triggering + /// + public int ConfigureSoftwareStopTrigger() + { + int pInvokeResult = PInvoke.ConfigureSoftwareStopTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Sets the data operation to have no Stop trigger. Calling this function + /// is only necessary if you have configured a Stop trigger and now want to disable it. + /// This function is valid only for generation sessions. + /// + /// + /// niHSDIO_DisableStopTrigger + /// ViStatus = niHSDIO_DisableStopTrigger ( ViSession vi); + /// Purpose + /// Sets the data operation to have no Stop trigger. Calling this function is only necessary if you have configured a Stop trigger and now want to disable it. This function is valid only for generation sessions. + /// + public int DisablStopTrigger() + { + int pInvokeResult = PInvoke.DisableStopTrigger(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Takes the error code returned by the instrument driver functions, + /// interprets it, and returns it as a user readable string. + /// + /// + /// The error code returned from the device + /// + /// + /// Returns the message string. + /// + /// + /// niHSDIO_error_message + ///ViStatus = niHSDIO_error_message ( ViSession vi, ViStatus errorCode, ViChar errorMessage[256]); + ///Purpose + ///Takes the error code returned by the instrument driver functions, interprets it, and returns it as a user readable string. + /// + public int error_message(int Error_Code, System.Text.StringBuilder Error_Message_2) + { + int pInvokeResult = PInvoke.error_message(this._handle, Error_Code, Error_Message_2); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// This function queries the value of a ViSession attribute. + /// You can use this function to get the values of device-specific attributes and inherent IVI attributes. + /// + /// + /// If the attribute is channel or instance based, this parameter specifies the name of the channel + /// or instance on which to set the value of the attribute; if the attribute is not channel or instance based, + /// pass VI_NULL or an empty string.You can pass in multiple channels to this function + /// + /// + /// The ID of an attribute + /// + /// + /// Returns the current value of the attribute; pass the address of a ViSession variable + /// + /// + /// niHSDIO_GetAttributeViSession + ///ViStatus = niHSDIO_GetAttributeViSession ( ViSession vi, ViConstString channelName, ViAttr attribute, ViSession *value); + ///Purpose + ///This function queries the value of a ViSession attribute. + ///You can use this function to get the values of device-specific attributes and inherent IVI attributes. + /// + public int GetSession(string Channel_List, int Attribute_ID, out System.IntPtr Value) + { + int pInvokeResult = PInvoke.GetAttributeViSession(this._handle, Channel_List, Attribute_ID, out Value); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// This function sets the value of a ViSession attribute. + /// This is a low-level function that you can use to set the values of + /// device-specific attributes and inherent IVI attributes. + /// + /// + /// If the attribute is channel or instance based, + /// this parameter specifies the name of the channel or instance on which to set the value of the attribute; + /// if the attribute is not channel or instance based, pass VI_NULL or an empty string. + /// You can pass in multiple channels to this function. + /// + /// + /// The ID of an attribute. + /// + /// + /// The value to which you want to set the attribute; + /// some of the values might not be valid depending on the current settings of the instrument session + /// + /// + /// niHSDIO_SetAttributeViSession + ///ViStatus = niHSDIO_SetAttributeViSession ( ViSession vi, ViConstString channelName, ViAttr attribute, ViSession value); + ///Purpose + ///This function sets the value of a ViSession attribute. + ///This is a low-level function that you can use to set the values of device-specific attributes and inherent IVI attributes. + /// + public int SetSession(string Channel_List, int Attribute_ID, System.IntPtr Value) + { + int pInvokeResult = PInvoke.SetAttributeViSession(this._handle, Channel_List, Attribute_ID, Value); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// This function obtains the multithreaded lock on the instrument session. + /// Before doing so, the function waits until all other execution threads have released the lock on the instrument session. + /// + /// + /// This parameter serves as a convenience. + /// You can use this parameter in complex functions to track lock status and the need to unlock the session. Pass the address of a local boolean variable in the declaration of the local variable and initialize it to FALSE. + /// + /// + /// niHSDIO_LockSession + /// ViStatus = niHSDIO_LockSession ( ViSession vi, ViBoolean *callerHasLock); + /// Purpose + /// This function obtains the multithreaded lock on the instrument session. + /// Before doing so, the function waits until all other execution threads have released the lock on the instrument session. + /// Other threads might have obtained the lock on this session in the following ways + /// Your application called niHSDIO_LockSession + /// A call to the instrument driver locked the session + /// A call to the IVI engine locked the session + /// After the call to niHSDIO_LockSession returns successfully, + /// no other threads can access the instrument session until you call niHSDIO_UnlockSession. + /// Use niHSDIO_LockSession and niHSDIO_UnlockSession around a sequence of calls to instrument driver functions if you require exclusive access through the end of the sequence. + /// You can safely make nested calls to niHSDIO_LockSession within the same thread. + /// To completely unlock the session, you must balance each call to niHSDIO_LockSession with a call to niHSDIO_UnlockSession. If, however, you use the callerHasLock parameter in all calls to niHSDIO_LockSession and niHSDIO_UnlockSession within a function, the IVI Library locks the session only once within the function, regardless of the number of calls you make to niHSDIO_LockSession. This functionality allows you to call niHSDIO_UnlockSession just once at the end of the function. + /// + public int LockSession(out bool callerHasLock) + { + ushort callerLock; + int pInvokeResult = PInvoke.LockSession(this._handle, out callerLock); + callerHasLock = Convert.ToBoolean(callerLock); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// This function releases a lock that you acquired on an instrument session using the LockSession function. + /// + /// + /// This parameter serves as a convenience. If you do not want to use this parameter, + /// pass VI_NULL. You can use this parameter in complex functions to track lock status and the need to unlock the session. + /// Pass the address of a local ViBoolean variable in the declaration of the local variable + /// and initialize it to VI_FALSE. + /// + /// + /// niHSDIO_UnlockSession + ///ViStatus = niHSDIO_UnlockSession ( ViSession vi, ViBoolean *callerHasLock); + ///Purpose + ///This function releases a lock that you acquired on an instrument session using the niHSDIO_LockSession function + /// + public int UnlockSession(out bool callerHasLock) + { + ushort callerLock; + int pInvokeResult = PInvoke.UnlockSession(this._handle, out callerLock); + callerHasLock = Convert.ToBoolean(callerLock); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Clears the error information for the current execution thread and the IVI session you specify. + /// If you pass VI_NULL for the vi parameter, this function clears the error information only for the current execution thread. + /// + /// + /// niHSDIO_ClearError + ///ViStatus = niHSDIO_ClearError ( ViSession vi); + ///Purpose + ///Clears the error information for the current execution thread and the IVI session you specify. If you pass VI_NULL for the vi parameter, this function clears the error information only for the current execution thread. + /// + public int ClearError() + { + int pInvokeResult = PInvoke.ClearError(this._handle); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + /// + public int ResetAttribute(string Channel_Name, int attributeId) + { + int pInvokeResult = PInvoke.ResetAttribute(this._handle, Channel_Name, attributeId); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + /// + public int GetFetchBackLog(int recordNumber, out int backLog) + { + int pInvokeResult = PInvoke.GetFetchBacklog(this._handle, recordNumber, out backLog); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + public int GetSelfCalSupported(out bool callerHasLock) + { + ushort callerLock; + int pInvokeResult = PInvoke.GetSelfCalSupported(this._handle, out callerLock); + callerHasLock = Convert.ToBoolean(callerLock); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + public int SetCalUserDefinedInfo(string info) + { + int pInvokeResult = PInvoke.SetCalUserDefinedInfo(this._handle, info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + public int GetCalUserDefinedInfo(out string info) + { + int pInvokeResult = PInvoke.GetCalUserDefinedInfo(this._handle, out info); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// + /// + /// + /// + public int GetCalUserDefinedInfoMaxSize(out int size) + { + int pInvokeResult = PInvoke.GetCalUserDefinedInfoMaxSize(this._handle, out size); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Returns the date and time of the most recent successful self-calibration. + /// + /// + /// The year in which the device was last calibrated. + /// + /// + /// The month in which the device was last calibrated. + /// + /// + /// The day the device was last calibrated. + /// + /// + /// The hour the device was last calibrated. + /// + /// + /// The minute the device was last calibrated. + /// + /// + public int GetSelfCalLastDateAndTime(out int year, out int month, out int day, out int hour, out int minute) + { + int pInvokeResult = PInvoke.GetSelfCalLastDateAndTime(this._handle, out year, out month, out day, out hour, out minute); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Returns the date and time of the most recent successful external calibration. + /// + /// + /// The year in which the device was last calibrated. + /// + /// + /// The month in which the device was last calibrated. + /// + /// + /// The day the device was last calibrated. + /// + /// + /// The hour the device was last calibrated. + /// + /// + /// The minute the device was last calibrated. + /// + /// + public int GetExtCalLastDateAndTime(out int year, out int month, out int day, out int hour, out int minute) + { + int pInvokeResult = PInvoke.GetExtCalLastDateAndTime(this._handle, out year, out month, out day, out hour, out minute); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Returns the onboard temperature of the device in degrees Celsius during the last successful self-calibration. + /// + /// + /// The onboard temperature of the device (in degrees Celsius) during the last successful self-calibration. + /// + /// + /// niHSDIO_GetSelfCalLastTemp + ///ViStatus = niHSDIO_GetSelfCalLastTemp ( ViSession vi, ViReal64* temp); + ///Purpose + ///Returns the onboard temperature of the device in degrees Celsius during the last successful self-calibration. + /// + public int GetSelfCalLastTemp(out double temp) + { + int pInvokeResult = PInvoke.GetSelfCalLastTemp(this._handle, out temp); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + + /// + /// Returns the onboard temperature of the device in degrees Celsius during the last successful external-calibration. + /// + /// + /// The onboard temperature of the device (in degrees Celsius) during the last successful external-calibration. + /// + /// + /// niHSDIO_GetExtCalLastTemp + ///ViStatus = niHSDIO_GetExtCalLastTemp ( ViSession vi, ViReal64* temp); + ///Purpose + ///Returns the onboard temperature of the device in degrees Celsius during the last successful external calibration. + /// + public int GetExtCalLastTemp(out double temp) + { + int pInvokeResult = PInvoke.GetExtCalLastTemp(this._handle, out temp); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + + /// + /// Returns the recommended number of months between external calibrations. + /// + /// + /// Identifies the recommended maximum interval, in months, between external calibrations + /// + /// + /// niHSDIO_GetExtCalRecommendedInterval + ///ViStatus = niHSDIO_GetExtCalRecommendedInterval ( ViSession vi, ViInt32* interval); + ///Purpose + ///Returns the recommended number of months between external calibrations. + /// + public int GetExtCalRecommendedInterval(out int interval) + { + int pInvokeResult = PInvoke.GetExtCalRecommendedInterval(this._handle, out interval); + PInvoke.TestForError(this._handle, pInvokeResult); + return pInvokeResult; + } + #endregion + + /// + /// + /// + public void Dispose() + { + this.Dispose(true); + System.GC.SuppressFinalize(this); + } + private void Dispose(bool disposing) + { + if ((this._disposed == false)) + { + PInvoke.close(this._handle); + this._handle = System.IntPtr.Zero; + } + this._disposed = true; + } + /// + /// + /// + ~niHSDIO() + { + Dispose(false); + } + + private class PInvoke + { + + private const string hsdioModuleName32 = "niHSDIO.dll"; + private const string hsdioModuleName64 = "niHSDIO_64.dll"; + + // Define the readonly field to check for process' bitness. + private static readonly bool Is64BitProcess = (IntPtr.Size == 8); + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_InitAcquisitionSession", CallingConvention = CallingConvention.StdCall)] + public static extern int InitAcquisitionSession_32(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_InitAcquisitionSession", CallingConvention = CallingConvention.StdCall)] + public static extern int InitAcquisitionSession_64(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle); + public static int InitAcquisitionSession(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return InitAcquisitionSession_64(Resource_Name, ID_Query, Reset_Instrument, Option_String, out Instrument_Handle); + else + return InitAcquisitionSession_32(Resource_Name, ID_Query, Reset_Instrument, Option_String, out Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_InitGenerationSession", CallingConvention = CallingConvention.StdCall)] + public static extern int InitGenerationSession_32(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_InitGenerationSession", CallingConvention = CallingConvention.StdCall)] + public static extern int InitGenerationSession_64(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle); + public static int InitGenerationSession(string Resource_Name, ushort ID_Query, ushort Reset_Instrument, string Option_String, out System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return InitGenerationSession_64(Resource_Name, ID_Query, Reset_Instrument, Option_String, out Instrument_Handle); + else + return InitGenerationSession_32(Resource_Name, ID_Query, Reset_Instrument, Option_String, out Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_InitExtCal", CallingConvention = CallingConvention.StdCall)] + public static extern int InitExtCal_32(string Resource_Name, string Password, out System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_InitExtCal", CallingConvention = CallingConvention.StdCall)] + public static extern int InitExtCal_64(string Resource_Name, string Password, out System.IntPtr Instrument_Handle); + public static int InitExtCal(string Resource_Name, string Password, out System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return InitExtCal_64(Resource_Name, Password, out Instrument_Handle); + else + return InitExtCal_32(Resource_Name, Password, out Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDataVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataVoltageLogicFamily_32(System.IntPtr Instrument_Handle, string Channel_List, int Logic_Family); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDataVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataVoltageLogicFamily_64(System.IntPtr Instrument_Handle, string Channel_List, int Logic_Family); + public static int ConfigureDataVoltageLogicFamily(System.IntPtr Instrument_Handle, string Channel_List, int Logic_Family) + { + if (Is64BitProcess) + return ConfigureDataVoltageLogicFamily_64(Instrument_Handle, Channel_List, Logic_Family); + else + return ConfigureDataVoltageLogicFamily_32(Instrument_Handle, Channel_List, Logic_Family); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDataVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataVoltageCustomLevels_32(System.IntPtr Instrument_Handle, string Channel_List, double Low_Level, double High_Level); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDataVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataVoltageCustomLevels_64(System.IntPtr Instrument_Handle, string Channel_List, double Low_Level, double High_Level); + public static int ConfigureDataVoltageCustomLevels(System.IntPtr Instrument_Handle, string Channel_List, double Low_Level, double High_Level) + { + if (Is64BitProcess) + return ConfigureDataVoltageCustomLevels_64(Instrument_Handle, Channel_List, Low_Level, High_Level); + else + return ConfigureDataVoltageCustomLevels_32(Instrument_Handle, Channel_List, Low_Level, High_Level); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureTriggerVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureTriggerVoltageLogicFamily_32(System.IntPtr Instrument_Handle, int Logic_Family); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureTriggerVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureTriggerVoltageLogicFamily_64(System.IntPtr Instrument_Handle, int Logic_Family); + public static int ConfigureTriggerVoltageLogicFamily(System.IntPtr Instrument_Handle, int Logic_Family) + { + if (Is64BitProcess) + return ConfigureTriggerVoltageLogicFamily_64(Instrument_Handle, Logic_Family); + else + return ConfigureTriggerVoltageLogicFamily_32(Instrument_Handle, Logic_Family); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureTriggerVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureTriggerVoltageCustomLevels_32(System.IntPtr Instrument_Handle, double Low_Level, double High_Level); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureTriggerVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureTriggerVoltageCustomLevels_64(System.IntPtr Instrument_Handle, double Low_Level, double High_Level); + public static int ConfigureTriggerVoltageCustomLevels(System.IntPtr Instrument_Handle, double Low_Level, double High_Level) + { + if (Is64BitProcess) + return ConfigureTriggerVoltageCustomLevels_64(Instrument_Handle, Low_Level, High_Level); + else + return ConfigureTriggerVoltageCustomLevels_32(Instrument_Handle, Low_Level, High_Level); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureEventVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureEventVoltageLogicFamily_32(System.IntPtr Instrument_Handle, int Logic_Family); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureEventVoltageLogicFamily", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureEventVoltageLogicFamily_64(System.IntPtr Instrument_Handle, int Logic_Family); + public static int ConfigureEventVoltageLogicFamily(System.IntPtr Instrument_Handle, int Logic_Family) + { + if (Is64BitProcess) + return ConfigureEventVoltageLogicFamily_64(Instrument_Handle, Logic_Family); + else + return ConfigureEventVoltageLogicFamily_32(Instrument_Handle, Logic_Family); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureEventVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureEventVoltageCustomLevels_32(System.IntPtr Instrument_Handle, double Low_Level, double High_Level); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureEventVoltageCustomLevels", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureEventVoltageCustomLevels_64(System.IntPtr Instrument_Handle, double Low_Level, double High_Level); + public static int ConfigureEventVoltageCustomLevels(System.IntPtr Instrument_Handle, double Low_Level, double High_Level) + { + if (Is64BitProcess) + return ConfigureEventVoltageCustomLevels_64(Instrument_Handle, Low_Level, High_Level); + else + return ConfigureEventVoltageCustomLevels_32(Instrument_Handle, Low_Level, High_Level); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_AssignDynamicChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int AssignDynamicChannels_32(System.IntPtr Instrument_Handle, string Channel_List); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_AssignDynamicChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int AssignDynamicChannels_64(System.IntPtr Instrument_Handle, string Channel_List); + public static int AssignDynamicChannels(System.IntPtr Instrument_Handle, string Channel_List) + { + if (Is64BitProcess) + return AssignDynamicChannels_64(Instrument_Handle, Channel_List); + else + return AssignDynamicChannels_32(Instrument_Handle, Channel_List); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_Initiate", CallingConvention = CallingConvention.StdCall)] + public static extern int Initiate_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_Initiate", CallingConvention = CallingConvention.StdCall)] + public static extern int Initiate_64(System.IntPtr Instrument_Handle); + public static int Initiate(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return Initiate_64(Instrument_Handle); + else + return Initiate_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WaitUntilDone", CallingConvention = CallingConvention.StdCall)] + public static extern int WaitUntilDone_32(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WaitUntilDone", CallingConvention = CallingConvention.StdCall)] + public static extern int WaitUntilDone_64(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds); + public static int WaitUntilDone(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds) + { + if (Is64BitProcess) + return WaitUntilDone_64(Instrument_Handle, Max_Time_Milliseconds); + else + return WaitUntilDone_32(Instrument_Handle, Max_Time_Milliseconds); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_Abort", CallingConvention = CallingConvention.StdCall)] + public static extern int Abort_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_Abort", CallingConvention = CallingConvention.StdCall)] + public static extern int Abort_64(System.IntPtr Instrument_Handle); + public static int Abort(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return Abort_64(Instrument_Handle); + else + return Abort_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureAcquisitionSize", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureAcquisitionSize_32(System.IntPtr Instrument_Handle, int Samples_Per_Record, int Number_Of_Records); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureAcquisitionSize", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureAcquisitionSize_64(System.IntPtr Instrument_Handle, int Samples_Per_Record, int Number_Of_Records); + public static int ConfigureAcquisitionSize(System.IntPtr Instrument_Handle, int Samples_Per_Record, int Number_Of_Records) + { + if (Is64BitProcess) + return ConfigureAcquisitionSize_64(Instrument_Handle, Samples_Per_Record, Number_Of_Records); + else + return ConfigureAcquisitionSize_32(Instrument_Handle, Samples_Per_Record, Number_Of_Records); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDataInterpretation", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataInterpretation_32(System.IntPtr Instrument_Handle, string Channel_List, int Data_Interpretation); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDataInterpretation", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataInterpretation_64(System.IntPtr Instrument_Handle, string Channel_List, int Data_Interpretation); + public static int ConfigureDataInterpretation(System.IntPtr Instrument_Handle, string Channel_List, int Data_Interpretation) + { + if (Is64BitProcess) + return ConfigureDataInterpretation_64(Instrument_Handle, Channel_List, Data_Interpretation); + else + return ConfigureDataInterpretation_32(Instrument_Handle, Channel_List, Data_Interpretation); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU32_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU32_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data); + public static int ReadWaveformU32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data) + { + if (Is64BitProcess) + return ReadWaveformU32_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return ReadWaveformU32_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU32_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU32_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data); + public static int FetchWaveformU32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] uint[] Data) + { + if (Is64BitProcess) + return FetchWaveformU32_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return FetchWaveformU32_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU16_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU16_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data); + public static int ReadWaveformU16(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data) + { + if (Is64BitProcess) + return ReadWaveformU16_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return ReadWaveformU16_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU16_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU16_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data); + public static int FetchWaveformU16(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] ushort[] Data) + { + if (Is64BitProcess) + return FetchWaveformU16_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return FetchWaveformU16_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU8_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadWaveformU8_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data); + public static int ReadWaveformU8(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data) + { + if (Is64BitProcess) + return ReadWaveformU8_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return ReadWaveformU8_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU8_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformU8_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data); + public static int FetchWaveformU8(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Read, [In(), Out()] byte[] Data) + { + if (Is64BitProcess) + return FetchWaveformU8_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + else + return FetchWaveformU8_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, out Number_Of_Samples_Read, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadMultiRecordU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU32_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadMultiRecordU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU32_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info); + public static int ReadMultiRecordU32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return ReadMultiRecordU32_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return ReadMultiRecordU32_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchMultiRecordU32", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU32_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchMultiRecordU32", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU32_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info); + public static int FetchMultiRecordU32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, uint[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return FetchMultiRecordU32_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return FetchMultiRecordU32_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadMultiRecordU16", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU16_32(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadMultiRecordU16", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU16_64(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info); + public static int ReadMultiRecordU16(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return ReadMultiRecordU16_64(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return ReadMultiRecordU16_32(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchMultiRecordU16", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU16_32(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchMultiRecordU16", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU16_64(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info); + public static int FetchMultiRecordU16(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, int Starting_Record, int Number_of_Records, ushort[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return FetchMultiRecordU16_64(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return FetchMultiRecordU16_32(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadMultiRecordU8", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU8_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadMultiRecordU8", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadMultiRecordU8_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info); + public static int ReadMultiRecordU8(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return ReadMultiRecordU8_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return ReadMultiRecordU8_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchMultiRecordU8", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU8_32(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchMultiRecordU8", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchMultiRecordU8_64(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info); + public static int FetchMultiRecordU8(System.IntPtr Instrument_Handle, int Samples_To_Read, int Max_Time_Milliseconds, int Starting_Record, int Number_of_Records, byte[] Data, nihsdio_wfminfo Waveform_Info) + { + if (Is64BitProcess) + return FetchMultiRecordU8_64(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + else + return FetchMultiRecordU8_32(Instrument_Handle, Samples_To_Read, Max_Time_Milliseconds, Starting_Record, Number_of_Records, Data, Waveform_Info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_FetchWaveformDirectDMA", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformDirectDMA_32(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, uint Buffer_Size, System.IntPtr Buffer_Address, nihsdio_wfminfo Waveform_Info, uint Offset_to_First_Sample); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_FetchWaveformDirectDMA", CallingConvention = CallingConvention.StdCall)] + public static extern int FetchWaveformDirectDMA_64(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, uint Buffer_Size, System.IntPtr Buffer_Address, nihsdio_wfminfo Waveform_Info, uint Offset_to_First_Sample); + public static int FetchWaveformDirectDMA(System.IntPtr Instrument_Handle, int Max_Time_Milliseconds, int Samples_To_Read, uint Buffer_Size, System.IntPtr Buffer_Address, nihsdio_wfminfo Waveform_Info, uint Offset_to_First_Sample) + { + if (Is64BitProcess) + return FetchWaveformDirectDMA_64(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Buffer_Size, Buffer_Address, Waveform_Info, Offset_to_First_Sample); + else + return FetchWaveformDirectDMA_32(Instrument_Handle, Max_Time_Milliseconds, Samples_To_Read, Buffer_Size, Buffer_Address, Waveform_Info, Offset_to_First_Sample); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_HWC_FetchSampleErrors", CallingConvention = CallingConvention.StdCall)] + public static extern int HWC_FetchSampleErrors_32(System.IntPtr Instrument_Handle, int Number_of_Sample_Errors_to_Read, int Max_Time_Milliseconds, out int Number_Of_Sample_Errors_Read, [In, Out] double[] Sample_Number, [In, Out] uint[] Error_Bits, [In, Out] uint[] Error_Repeat_Counts, out uint Reserved_1, out uint Reserved_2); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_HWC_FetchSampleErrors", CallingConvention = CallingConvention.StdCall)] + public static extern int HWC_FetchSampleErrors_64(System.IntPtr Instrument_Handle, int Number_of_Sample_Errors_to_Read, int Max_Time_Milliseconds, out int Number_Of_Sample_Errors_Read, [In, Out] double[] Sample_Number, [In, Out] uint[] Error_Bits, [In, Out] uint[] Error_Repeat_Counts, out uint Reserved_1, out uint Reserved_2); + public static int HWC_FetchSampleErrors(System.IntPtr Instrument_Handle, int Number_of_Sample_Errors_to_Read, int Max_Time_Milliseconds, out int Number_Of_Sample_Errors_Read, [In, Out] double[] Sample_Number, [In, Out] uint[] Error_Bits, [In, Out] uint[] Error_Repeat_Counts, out uint Reserved_1, out uint Reserved_2) + { + if (Is64BitProcess) + return HWC_FetchSampleErrors_32(Instrument_Handle, Number_of_Sample_Errors_to_Read, Max_Time_Milliseconds, out Number_Of_Sample_Errors_Read, Sample_Number, Error_Bits, Error_Repeat_Counts, out Reserved_1, out Reserved_2); + else + return HWC_FetchSampleErrors_64(Instrument_Handle, Number_of_Sample_Errors_to_Read, Max_Time_Milliseconds, out Number_Of_Sample_Errors_Read, Sample_Number, Error_Bits, Error_Repeat_Counts, out Reserved_1, out Reserved_2); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteNamedWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU32_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, uint[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteNamedWaveformU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU32_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, uint[] Data); + public static int WriteNamedWaveformU32(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, uint[] Data) + { + if (Is64BitProcess) + return WriteNamedWaveformU32_64(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + else + return WriteNamedWaveformU32_32(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteNamedWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU16_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, ushort[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteNamedWaveformU16", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU16_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, ushort[] Data); + public static int WriteNamedWaveformU16(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, ushort[] Data) + { + if (Is64BitProcess) + return WriteNamedWaveformU16_64(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + else + return WriteNamedWaveformU16_32(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteNamedWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU8_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, byte[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteNamedWaveformU8", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformU8_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, byte[] Data); + public static int WriteNamedWaveformU8(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, byte[] Data) + { + if (Is64BitProcess) + return WriteNamedWaveformU8_64(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + else + return WriteNamedWaveformU8_32(Instrument_Handle, Waveform_Name, Samples_To_Write, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteNamedWaveformWDT", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformWDT_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, int Data_Layout, byte[] Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteNamedWaveformWDT", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformWDT_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, int Data_Layout, byte[] Data); + public static int WriteNamedWaveformWDT(System.IntPtr Instrument_Handle, string Waveform_Name, int Samples_To_Write, int Data_Layout, byte[] Data) + { + if (Is64BitProcess) + return WriteNamedWaveformWDT_64(Instrument_Handle, Waveform_Name, Samples_To_Write, Data_Layout, Data); + else + return WriteNamedWaveformWDT_32(Instrument_Handle, Waveform_Name, Samples_To_Write, Data_Layout, Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteNamedWaveformFromFileHWS", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformFromFileHWS_32(System.IntPtr Instrument_Handle, string Waveform_Name, string File_Path, ushort Use_Rate_From_Waveform, out int Waveform_Size); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteNamedWaveformFromFileHWS", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteNamedWaveformFromFileHWS_64(System.IntPtr Instrument_Handle, string Waveform_Name, string File_Path, ushort Use_Rate_From_Waveform, out int Waveform_Size); + public static int WriteNamedWaveformFromFileHWS(System.IntPtr Instrument_Handle, string Waveform_Name, string File_Path, ushort Use_Rate_From_Waveform, out int Waveform_Size) + { + if (Is64BitProcess) + return WriteNamedWaveformFromFileHWS_64(Instrument_Handle, Waveform_Name, File_Path, Use_Rate_From_Waveform, out Waveform_Size); + else + return WriteNamedWaveformFromFileHWS_32(Instrument_Handle, Waveform_Name, File_Path, Use_Rate_From_Waveform, out Waveform_Size); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureIdleState", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureIdleState_32(System.IntPtr Instrument_Handle, string Channel_List, string Idle_State); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureIdleState", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureIdleState_64(System.IntPtr Instrument_Handle, string Channel_List, string Idle_State); + public static int ConfigureIdleState(System.IntPtr Instrument_Handle, string Channel_List, string Idle_State) + { + if (Is64BitProcess) + return ConfigureIdleState_64(Instrument_Handle, Channel_List, Idle_State); + else + return ConfigureIdleState_32(Instrument_Handle, Channel_List, Idle_State); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureIdleStateU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureIdleStateU32_32(System.IntPtr Instrument_Handle, uint Idle_State); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureIdleStateU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureIdleStateU32_64(System.IntPtr Instrument_Handle, uint Idle_State); + public static int ConfigureIdleStateU32(System.IntPtr Instrument_Handle, uint Idle_State) + { + if (Is64BitProcess) + return ConfigureIdleStateU32_64(Instrument_Handle, Idle_State); + else + return ConfigureIdleStateU32_32(Instrument_Handle, Idle_State); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureInitialState", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureInitialState_32(System.IntPtr Instrument_Handle, string Channel_List, string Initial_State); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureInitialState", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureInitialState_64(System.IntPtr Instrument_Handle, string Channel_List, string Initial_State); + public static int ConfigureInitialState(System.IntPtr Instrument_Handle, string Channel_List, string Initial_State) + { + if (Is64BitProcess) + return ConfigureInitialState_64(Instrument_Handle, Channel_List, Initial_State); + else + return ConfigureInitialState_32(Instrument_Handle, Channel_List, Initial_State); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureInitialStateU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureInitialStateU32_32(System.IntPtr Instrument_Handle, uint Initial_State); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureInitialStateU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureInitialStateU32_64(System.IntPtr Instrument_Handle, uint Initial_State); + public static int ConfigureInitialStateU32(System.IntPtr Instrument_Handle, uint Initial_State) + { + if (Is64BitProcess) + return ConfigureInitialStateU32_64(Instrument_Handle, Initial_State); + else + return ConfigureInitialStateU32_32(Instrument_Handle, Initial_State); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureGenerationRepeat", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureGenerationRepeat_32(System.IntPtr Instrument_Handle, int Repeat_Mode, int Repeat_Count); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureGenerationRepeat", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureGenerationRepeat_64(System.IntPtr Instrument_Handle, int Repeat_Mode, int Repeat_Count); + public static int ConfigureGenerationRepeat(System.IntPtr Instrument_Handle, int Repeat_Mode, int Repeat_Count) + { + if (Is64BitProcess) + return ConfigureGenerationRepeat_64(Instrument_Handle, Repeat_Mode, Repeat_Count); + else + return ConfigureGenerationRepeat_32(Instrument_Handle, Repeat_Mode, Repeat_Count); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureWaveformToGenerate", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureWaveformToGenerate_32(System.IntPtr Instrument_Handle, string Waveform_Name); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureWaveformToGenerate", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureWaveformToGenerate_64(System.IntPtr Instrument_Handle, string Waveform_Name); + public static int ConfigureWaveformToGenerate(System.IntPtr Instrument_Handle, string Waveform_Name) + { + if (Is64BitProcess) + return ConfigureWaveformToGenerate_64(Instrument_Handle, Waveform_Name); + else + return ConfigureWaveformToGenerate_32(Instrument_Handle, Waveform_Name); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_AllocateNamedWaveform", CallingConvention = CallingConvention.StdCall)] + public static extern int AllocateNamedWaveform_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Size_In_Samples); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_AllocateNamedWaveform", CallingConvention = CallingConvention.StdCall)] + public static extern int AllocateNamedWaveform_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Size_In_Samples); + public static int AllocateNamedWaveform(System.IntPtr Instrument_Handle, string Waveform_Name, int Size_In_Samples) + { + if (Is64BitProcess) + return AllocateNamedWaveform_64(Instrument_Handle, Waveform_Name, Size_In_Samples); + else + return AllocateNamedWaveform_32(Instrument_Handle, Waveform_Name, Size_In_Samples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetNamedWaveformNextWritePosition", CallingConvention = CallingConvention.StdCall)] + public static extern int SetNamedWaveformNextWritePosition_32(System.IntPtr Instrument_Handle, string Waveform_Name, int Position, int Offset); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetNamedWaveformNextWritePosition", CallingConvention = CallingConvention.StdCall)] + public static extern int SetNamedWaveformNextWritePosition_64(System.IntPtr Instrument_Handle, string Waveform_Name, int Position, int Offset); + public static int SetNamedWaveformNextWritePosition(System.IntPtr Instrument_Handle, string Waveform_Name, int Position, int Offset) + { + if (Is64BitProcess) + return SetNamedWaveformNextWritePosition_64(Instrument_Handle, Waveform_Name, Position, Offset); + else + return SetNamedWaveformNextWritePosition_32(Instrument_Handle, Waveform_Name, Position, Offset); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DeleteNamedWaveform", CallingConvention = CallingConvention.StdCall)] + public static extern int DeleteNamedWaveform_32(System.IntPtr Instrument_Handle, string Waveform_Name); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DeleteNamedWaveform", CallingConvention = CallingConvention.StdCall)] + public static extern int DeleteNamedWaveform_64(System.IntPtr Instrument_Handle, string Waveform_Name); + public static int DeleteNamedWaveform(System.IntPtr Instrument_Handle, string Waveform_Name) + { + if (Is64BitProcess) + return DeleteNamedWaveform_64(Instrument_Handle, Waveform_Name); + else + return DeleteNamedWaveform_32(Instrument_Handle, Waveform_Name); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureGenerationMode", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureGenerationMode_32(System.IntPtr Instrument_Handle, int Generation_Mode); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureGenerationMode", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureGenerationMode_64(System.IntPtr Instrument_Handle, int Generation_Mode); + public static int ConfigureGenerationMode(System.IntPtr Instrument_Handle, int Generation_Mode) + { + if (Is64BitProcess) + return ConfigureGenerationMode_64(Instrument_Handle, Generation_Mode); + else + return ConfigureGenerationMode_32(Instrument_Handle, Generation_Mode); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteScript", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteScript_32(System.IntPtr Instrument_Handle, string Script); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteScript", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteScript_64(System.IntPtr Instrument_Handle, string Script); + public static int WriteScript(System.IntPtr Instrument_Handle, string Script) + { + if (Is64BitProcess) + return WriteScript_64(Instrument_Handle, Script); + else + return WriteScript_32(Instrument_Handle, Script); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureScriptToGenerate", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureScriptToGenerate_32(System.IntPtr Instrument_Handle, string Script_Name); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureScriptToGenerate", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureScriptToGenerate_64(System.IntPtr Instrument_Handle, string Script_Name); + public static int ConfigureScriptToGenerate(System.IntPtr Instrument_Handle, string Script_Name) + { + if (Is64BitProcess) + return ConfigureScriptToGenerate_64(Instrument_Handle, Script_Name); + else + return ConfigureScriptToGenerate_32(Instrument_Handle, Script_Name); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSampleClock", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSampleClock_32(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSampleClock", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSampleClock_64(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate); + public static int ConfigureSampleClock(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate) + { + if (Is64BitProcess) + return ConfigureSampleClock_64(Instrument_Handle, Clock_Source, Clock_Rate); + else + return ConfigureSampleClock_32(Instrument_Handle, Clock_Source, Clock_Rate); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDataPosition", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataPosition_32(System.IntPtr Instrument_Handle, string Channel_List, int Position); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDataPosition", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataPosition_64(System.IntPtr Instrument_Handle, string Channel_List, int Position); + public static int ConfigureDataPosition(System.IntPtr Instrument_Handle, string Channel_List, int Position) + { + if (Is64BitProcess) + return ConfigureDataPosition_64(Instrument_Handle, Channel_List, Position); + else + return ConfigureDataPosition_32(Instrument_Handle, Channel_List, Position); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDataPositionDelay", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataPositionDelay_32(System.IntPtr Instrument_Handle, string Channel_List, double Delay); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDataPositionDelay", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDataPositionDelay_64(System.IntPtr Instrument_Handle, string Channel_List, double Delay); + public static int ConfigureDataPositionDelay(System.IntPtr Instrument_Handle, string Channel_List, double Delay) + { + if (Is64BitProcess) + return ConfigureDataPositionDelay_64(Instrument_Handle, Channel_List, Delay); + else + return ConfigureDataPositionDelay_32(Instrument_Handle, Channel_List, Delay); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureRefClock", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureRefClock_32(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureRefClock", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureRefClock_64(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate); + public static int ConfigureRefClock(System.IntPtr Instrument_Handle, string Clock_Source, double Clock_Rate) + { + if (Is64BitProcess) + return ConfigureRefClock_64(Instrument_Handle, Clock_Source, Clock_Rate); + else + return ConfigureRefClock_32(Instrument_Handle, Clock_Source, Clock_Rate); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_AdjustSampleClockRelativeDelay", CallingConvention = CallingConvention.StdCall)] + public static extern int AdjustSampleClockRelativeDelay_32(System.IntPtr Instrument_Handle, double Adjustment_Time); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_AdjustSampleClockRelativeDelay", CallingConvention = CallingConvention.StdCall)] + public static extern int AdjustSampleClockRelativeDelay_64(System.IntPtr Instrument_Handle, double Adjustment_Time); + public static int AdjustSampleClockRelativeDelay(System.IntPtr Instrument_Handle, double Adjustment_Time) + { + if (Is64BitProcess) + return AdjustSampleClockRelativeDelay_64(Instrument_Handle, Adjustment_Time); + else + return AdjustSampleClockRelativeDelay_32(Instrument_Handle, Adjustment_Time); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalEdgeStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeStartTrigger_32(System.IntPtr Instrument_Handle, string Source, int Edge); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalEdgeStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeStartTrigger_64(System.IntPtr Instrument_Handle, string Source, int Edge); + public static int ConfigureDigitalEdgeStartTrigger(System.IntPtr Instrument_Handle, string Source, int Edge) + { + if (Is64BitProcess) + return ConfigureDigitalEdgeStartTrigger_64(Instrument_Handle, Source, Edge); + else + return ConfigureDigitalEdgeStartTrigger_32(Instrument_Handle, Source, Edge); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchStartTrigger_32(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchStartTrigger_64(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + public static int ConfigurePatternMatchStartTrigger(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchStartTrigger_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchStartTrigger_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchStartTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchStartTriggerU32_32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchStartTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchStartTriggerU32_64(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + public static int ConfigurePatternMatchStartTriggerU32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchStartTriggerU32_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchStartTriggerU32_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSoftwareStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareStartTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSoftwareStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareStartTrigger_64(System.IntPtr Instrument_Handle); + public static int ConfigureSoftwareStartTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return ConfigureSoftwareStartTrigger_64(Instrument_Handle); + else + return ConfigureSoftwareStartTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisableStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableStartTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisableStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableStartTrigger_64(System.IntPtr Instrument_Handle); + public static int DisableStartTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return DisableStartTrigger_64(Instrument_Handle); + else + return DisableStartTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalEdgeRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeRefTrigger_32(System.IntPtr Instrument_Handle, string Source, int Edge, int Pretrigger_Samples); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalEdgeRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeRefTrigger_64(System.IntPtr Instrument_Handle, string Source, int Edge, int Pretrigger_Samples); + public static int ConfigureDigitalEdgeRefTrigger(System.IntPtr Instrument_Handle, string Source, int Edge, int Pretrigger_Samples) + { + if (Is64BitProcess) + return ConfigureDigitalEdgeRefTrigger_64(Instrument_Handle, Source, Edge, Pretrigger_Samples); + else + return ConfigureDigitalEdgeRefTrigger_32(Instrument_Handle, Source, Edge, Pretrigger_Samples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchRefTrigger_32(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When, int Pretrigger_Samples); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchRefTrigger_64(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When, int Pretrigger_Samples); + public static int ConfigurePatternMatchRefTrigger(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When, int Pretrigger_Samples) + { + if (Is64BitProcess) + return ConfigurePatternMatchRefTrigger_64(Instrument_Handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + else + return ConfigurePatternMatchRefTrigger_32(Instrument_Handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchRefTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchRefTriggerU32_32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When, int Pretrigger_Samples); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchRefTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchRefTriggerU32_64(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When, int Pretrigger_Samples); + public static int ConfigurePatternMatchRefTriggerU32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When, int Pretrigger_Samples) + { + if (Is64BitProcess) + return ConfigurePatternMatchRefTriggerU32_64(Instrument_Handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + else + return ConfigurePatternMatchRefTriggerU32_32(Instrument_Handle, Channel_List, Pattern, Trigger_When, Pretrigger_Samples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSoftwareRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareRefTrigger_32(System.IntPtr Instrument_Handle, int Pretrigger_Samples); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSoftwareRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareRefTrigger_64(System.IntPtr Instrument_Handle, int Pretrigger_Samples); + public static int ConfigureSoftwareRefTrigger(System.IntPtr Instrument_Handle, int Pretrigger_Samples) + { + if (Is64BitProcess) + return ConfigureSoftwareRefTrigger_64(Instrument_Handle, Pretrigger_Samples); + else + return ConfigureSoftwareRefTrigger_32(Instrument_Handle, Pretrigger_Samples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisableRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableRefTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisableRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableRefTrigger_64(System.IntPtr Instrument_Handle); + public static int DisableRefTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return DisableRefTrigger_64(Instrument_Handle); + else + return DisableRefTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalEdgeAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeAdvanceTrigger_32(System.IntPtr Instrument_Handle, string Source, int Edge); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalEdgeAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeAdvanceTrigger_64(System.IntPtr Instrument_Handle, string Source, int Edge); + public static int ConfigureDigitalEdgeAdvanceTrigger(System.IntPtr Instrument_Handle, string Source, int Edge) + { + if (Is64BitProcess) + return ConfigureDigitalEdgeAdvanceTrigger_64(Instrument_Handle, Source, Edge); + else + return ConfigureDigitalEdgeAdvanceTrigger_32(Instrument_Handle, Source, Edge); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchAdvanceTrigger_32(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchAdvanceTrigger_64(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + public static int ConfigurePatternMatchAdvanceTrigger(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchAdvanceTrigger_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchAdvanceTrigger_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchAdvanceTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchAdvanceTriggerU32_32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchAdvanceTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchAdvanceTriggerU32_64(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + public static int ConfigurePatternMatchAdvanceTriggerU32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchAdvanceTriggerU32_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchAdvanceTriggerU32_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSoftwareAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareAdvanceTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSoftwareAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareAdvanceTrigger_64(System.IntPtr Instrument_Handle); + public static int ConfigureSoftwareAdvanceTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return ConfigureSoftwareAdvanceTrigger_64(Instrument_Handle); + else + return ConfigureSoftwareAdvanceTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisableAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableAdvanceTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisableAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableAdvanceTrigger_64(System.IntPtr Instrument_Handle); + public static int DisableAdvanceTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return DisableAdvanceTrigger_64(Instrument_Handle); + else + return DisableAdvanceTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalEdgeScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeScriptTrigger_32(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Edge); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalEdgeScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeScriptTrigger_64(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Edge); + public static int ConfigureDigitalEdgeScriptTrigger(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Edge) + { + if (Is64BitProcess) + return ConfigureDigitalEdgeScriptTrigger_64(Instrument_Handle, Trigger_ID, Source, Edge); + else + return ConfigureDigitalEdgeScriptTrigger_32(Instrument_Handle, Trigger_ID, Source, Edge); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalLevelScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalLevelScriptTrigger_32(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Level); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalLevelScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalLevelScriptTrigger_64(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Level); + public static int ConfigureDigitalLevelScriptTrigger(System.IntPtr Instrument_Handle, string Trigger_ID, string Source, int Level) + { + if (Is64BitProcess) + return ConfigureDigitalLevelScriptTrigger_64(Instrument_Handle, Trigger_ID, Source, Level); + else + return ConfigureDigitalLevelScriptTrigger_32(Instrument_Handle, Trigger_ID, Source, Level); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSoftwareScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareScriptTrigger_32(System.IntPtr Instrument_Handle, string Trigger_ID); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSoftwareScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareScriptTrigger_64(System.IntPtr Instrument_Handle, string Trigger_ID); + public static int ConfigureSoftwareScriptTrigger(System.IntPtr Instrument_Handle, string Trigger_ID) + { + if (Is64BitProcess) + return ConfigureSoftwareScriptTrigger_64(Instrument_Handle, Trigger_ID); + else + return ConfigureSoftwareScriptTrigger_32(Instrument_Handle, Trigger_ID); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisableScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableScriptTrigger_32(System.IntPtr Instrument_Handle, string Trigger_ID); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisableScriptTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableScriptTrigger_64(System.IntPtr Instrument_Handle, string Trigger_ID); + public static int DisableScriptTrigger(System.IntPtr Instrument_Handle, string Trigger_ID) + { + if (Is64BitProcess) + return DisableScriptTrigger_64(Instrument_Handle, Trigger_ID); + else + return DisableScriptTrigger_32(Instrument_Handle, Trigger_ID); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalLevelPauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalLevelPauseTrigger_32(System.IntPtr Instrument_Handle, string Source, int Level); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalLevelPauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalLevelPauseTrigger_64(System.IntPtr Instrument_Handle, string Source, int Level); + public static int ConfigureDigitalLevelPauseTrigger(System.IntPtr Instrument_Handle, string Source, int Level) + { + if (Is64BitProcess) + return ConfigureDigitalLevelPauseTrigger_64(Instrument_Handle, Source, Level); + else + return ConfigureDigitalLevelPauseTrigger_32(Instrument_Handle, Source, Level); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchPauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchPauseTrigger_32(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchPauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchPauseTrigger_64(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When); + public static int ConfigurePatternMatchPauseTrigger(System.IntPtr Instrument_Handle, string Channel_List, string Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchPauseTrigger_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchPauseTrigger_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigurePatternMatchPauseTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchPauseTriggerU32_32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigurePatternMatchPauseTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigurePatternMatchPauseTriggerU32_64(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When); + public static int ConfigurePatternMatchPauseTriggerU32(System.IntPtr Instrument_Handle, string Channel_List, uint Pattern, int Trigger_When) + { + if (Is64BitProcess) + return ConfigurePatternMatchPauseTriggerU32_64(Instrument_Handle, Channel_List, Pattern, Trigger_When); + else + return ConfigurePatternMatchPauseTriggerU32_32(Instrument_Handle, Channel_List, Pattern, Trigger_When); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisablePauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisablePauseTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisablePauseTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisablePauseTrigger_64(System.IntPtr Instrument_Handle); + public static int DisablePauseTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return DisablePauseTrigger_64(Instrument_Handle); + else + return DisablePauseTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureDigitalEdgeStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeStopTrigger_32(System.IntPtr Instrument_Handle, string Source, int Edge); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureDigitalEdgeStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureDigitalEdgeStopTrigger_64(System.IntPtr Instrument_Handle, string Source, int Edge); + public static int ConfigureDigitalEdgeStopTrigger(System.IntPtr Instrument_Handle, string Source, int Edge) + { + if (Is64BitProcess) + return ConfigureDigitalEdgeStopTrigger_64(Instrument_Handle, Source, Edge); + else + return ConfigureDigitalEdgeStopTrigger_32(Instrument_Handle, Source, Edge); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureSoftwareStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareStopTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureSoftwareStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureSoftwareStopTrigger_64(System.IntPtr Instrument_Handle); + public static int ConfigureSoftwareStopTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return ConfigureSoftwareStopTrigger_64(Instrument_Handle); + else + return ConfigureSoftwareStopTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_DisableStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableStopTrigger_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_DisableStopTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int DisableStopTrigger_64(System.IntPtr Instrument_Handle); + public static int DisableStopTrigger(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return DisableStopTrigger_64(Instrument_Handle); + else + return DisableStopTrigger_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SendSoftwareEdgeTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int SendSoftwareEdgeTrigger_32(System.IntPtr Instrument_Handle, int Trigger, string Trigger_Identifier); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SendSoftwareEdgeTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int SendSoftwareEdgeTrigger_64(System.IntPtr Instrument_Handle, int Trigger, string Trigger_Identifier); + public static int SendSoftwareEdgeTrigger(System.IntPtr Instrument_Handle, int Trigger, string Trigger_Identifier) + { + if (Is64BitProcess) + return SendSoftwareEdgeTrigger_64(Instrument_Handle, Trigger, Trigger_Identifier); + else + return SendSoftwareEdgeTrigger_32(Instrument_Handle, Trigger, Trigger_Identifier); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ExportSignal", CallingConvention = CallingConvention.StdCall)] + public static extern int ExportSignal_32(System.IntPtr Instrument_Handle, int Signal, string Signal_Identifier, string Output_Terminal); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ExportSignal", CallingConvention = CallingConvention.StdCall)] + public static extern int ExportSignal_64(System.IntPtr Instrument_Handle, int Signal, string Signal_Identifier, string Output_Terminal); + public static int ExportSignal(System.IntPtr Instrument_Handle, int Signal, string Signal_Identifier, string Output_Terminal) + { + if (Is64BitProcess) + return ExportSignal_64(Instrument_Handle, Signal, Signal_Identifier, Output_Terminal); + else + return ExportSignal_32(Instrument_Handle, Signal, Signal_Identifier, Output_Terminal); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_AssignStaticChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int AssignStaticChannels_32(System.IntPtr Instrument_Handle, string Channel_List); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_AssignStaticChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int AssignStaticChannels_64(System.IntPtr Instrument_Handle, string Channel_List); + public static int AssignStaticChannels(System.IntPtr Instrument_Handle, string Channel_List) + { + if (Is64BitProcess) + return AssignStaticChannels_64(Instrument_Handle, Channel_List); + else + return AssignStaticChannels_32(Instrument_Handle, Channel_List); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadStaticU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadStaticU32_32(System.IntPtr Instrument_Handle, out uint Read_Data); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadStaticU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadStaticU32_64(System.IntPtr Instrument_Handle, out uint Read_Data); + public static int ReadStaticU32(System.IntPtr Instrument_Handle, out uint Read_Data) + { + if (Is64BitProcess) + return ReadStaticU32_64(Instrument_Handle, out Read_Data); + else + return ReadStaticU32_32(Instrument_Handle, out Read_Data); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteStaticU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteStaticU32_32(System.IntPtr Instrument_Handle, uint Write_Data, uint Channel_Mask); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteStaticU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteStaticU32_64(System.IntPtr Instrument_Handle, uint Write_Data, uint Channel_Mask); + public static int WriteStaticU32(System.IntPtr Instrument_Handle, uint Write_Data, uint Channel_Mask) + { + if (Is64BitProcess) + return WriteStaticU32_64(Instrument_Handle, Write_Data, Channel_Mask); + else + return WriteStaticU32_32(Instrument_Handle, Write_Data, Channel_Mask); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_SourceVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_SourceVoltage_32(System.IntPtr Instrument_Handle, string channelList, double voltageLevel, int sense, double currentRange); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_SourceVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_SourceVoltage_64(System.IntPtr Instrument_Handle, string channelList, double voltageLevel, int sense, double currentRange); + public static int STPMU_SourceVoltage(System.IntPtr Instrument_Handle, string channelList, double voltageLevel, int sense, double currentRange) + { + if (Is64BitProcess) + return STPMU_SourceVoltage_64(Instrument_Handle, channelList, voltageLevel, sense, currentRange); + else + return STPMU_SourceVoltage_32(Instrument_Handle, channelList, voltageLevel, sense, currentRange); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_SourceCurrent", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_SourceCurrent_32(System.IntPtr Instrument_Handle, string channelList, double currentLevel, double currentLevelRange, double lowerVoltageLimit, double upperVoltageLimit); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_SourceCurrent", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_SourceCurrent_64(System.IntPtr Instrument_Handle, string channelList, double currentLevel, double currentLevelRange, double lowerVoltageLimit, double upperVoltageLimit); + public static int STPMU_SourceCurrent(System.IntPtr Instrument_Handle, string channelList, double currentLevel, double currentLevelRange, double lowerVoltageLimit, double upperVoltageLimit) + { + if (Is64BitProcess) + return STPMU_SourceCurrent_64(Instrument_Handle, channelList, currentLevel, currentLevelRange, lowerVoltageLimit, upperVoltageLimit); + else + return STPMU_SourceCurrent_32(Instrument_Handle, channelList, currentLevel, currentLevelRange, lowerVoltageLimit, upperVoltageLimit); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_DisablePMU", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_DisablePMU_32(System.IntPtr Instrument_Handle, string channelList, int returnState); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_DisablePMU", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_DisablePMU_64(System.IntPtr Instrument_Handle, string channelList, int returnState); + public static int STPMU_DisablePMU(System.IntPtr Instrument_Handle, string channelList, int returnState) + { + if (Is64BitProcess) + return STPMU_DisablePMU_64(Instrument_Handle, channelList, returnState); + else + return STPMU_DisablePMU_32(Instrument_Handle, channelList, returnState); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_MeasureVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_MeasureVoltage_32(System.IntPtr Instrument_Handle, string channelList, double apertureTime__4_us_, int sense, [In(), Out()] double[] measurements, out int numberOfMeasurements); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_MeasureVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_MeasureVoltage_64(System.IntPtr Instrument_Handle, string channelList, double apertureTime__4_us_, int sense, [In(), Out()] double[] measurements, out int numberOfMeasurements); + public static int STPMU_MeasureVoltage(System.IntPtr Instrument_Handle, string channelList, double apertureTime__4_us_, int sense, [In(), Out()] double[] measurements, out int numberOfMeasurements) + { + if (Is64BitProcess) + return STPMU_MeasureVoltage_64(Instrument_Handle, channelList, apertureTime__4_us_, sense, measurements, out numberOfMeasurements); + else + return STPMU_MeasureVoltage_32(Instrument_Handle, channelList, apertureTime__4_us_, sense, measurements, out numberOfMeasurements); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_MeasureCurrent", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_MeasureCurrent_32(System.IntPtr Instrument_Handle, string channelList, double aperture_time__4_us_, [In(), Out()] double[] measurements, out int numberOfMeasurements); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_MeasureCurrent", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_MeasureCurrent_64(System.IntPtr Instrument_Handle, string channelList, double aperture_time__4_us_, [In(), Out()] double[] measurements, out int numberOfMeasurements); + public static int STPMU_MeasureCurrent(System.IntPtr Instrument_Handle, string channelList, double aperture_time__4_us_, [In(), Out()] double[] measurements, out int numberOfMeasurements) + { + if (Is64BitProcess) + return STPMU_MeasureCurrent_64(Instrument_Handle, channelList, aperture_time__4_us_, measurements, out numberOfMeasurements); + else + return STPMU_MeasureCurrent_32(Instrument_Handle, channelList, aperture_time__4_us_, measurements, out numberOfMeasurements); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_ExternalForceControl", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_ExternalForceControl_32(System.IntPtr Instrument_Handle, string channelList, int action, int connector); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_ExternalForceControl", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_ExternalForceControl_64(System.IntPtr Instrument_Handle, string channelList, int action, int connector); + public static int STPMU_ExternalForceControl(System.IntPtr Instrument_Handle, string channelList, int action, int connector) + { + if (Is64BitProcess) + return STPMU_ExternalForceControl_64(Instrument_Handle, channelList, action, connector); + else + return STPMU_ExternalForceControl_32(Instrument_Handle, channelList, action, connector); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_STPMU_ExternalSenseControl", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_ExternalSenseControl_32(System.IntPtr Instrument_Handle, string channel, int action, int connector); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_STPMU_ExternalSenseControl", CallingConvention = CallingConvention.StdCall)] + public static extern int STPMU_ExternalSenseControl_64(System.IntPtr Instrument_Handle, string channel, int action, int connector); + public static int STPMU_ExternalSenseControl(System.IntPtr Instrument_Handle, string channel, int action, int connector) + { + if (Is64BitProcess) + return STPMU_ExternalSenseControl_64(Instrument_Handle, channel, action, connector); + else + return STPMU_ExternalSenseControl_32(Instrument_Handle, channel, action, connector); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SelfCal", CallingConvention = CallingConvention.StdCall)] + public static extern int SelfCal_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SelfCal", CallingConvention = CallingConvention.StdCall)] + public static extern int SelfCal_64(System.IntPtr Instrument_Handle); + public static int SelfCal(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return SelfCal_64(Instrument_Handle); + else + return SelfCal_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ChangeExtCalPassword", CallingConvention = CallingConvention.StdCall)] + public static extern int ChangeExtCalPassword_32(System.IntPtr Instrument_Handle, string Old_Password, string New_Password); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ChangeExtCalPassword", CallingConvention = CallingConvention.StdCall)] + public static extern int ChangeExtCalPassword_64(System.IntPtr Instrument_Handle, string Old_Password, string New_Password); + public static int ChangeExtCalPassword(System.IntPtr Instrument_Handle, string Old_Password, string New_Password) + { + if (Is64BitProcess) + return ChangeExtCalPassword_64(Instrument_Handle, Old_Password, New_Password); + else + return ChangeExtCalPassword_32(Instrument_Handle, Old_Password, New_Password); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalAdjustChannelVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustChannelVoltage_32(System.IntPtr Instrument_Handle, string Channel); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalAdjustChannelVoltage", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustChannelVoltage_64(System.IntPtr Instrument_Handle, string Channel); + public static int CalAdjustChannelVoltage(System.IntPtr Instrument_Handle, string Channel) + { + if (Is64BitProcess) + return CalAdjustChannelVoltage_64(Instrument_Handle, Channel); + else + return CalAdjustChannelVoltage_32(Instrument_Handle, Channel); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CloseExtCal", CallingConvention = CallingConvention.StdCall)] + public static extern int CloseExtCal_32(System.IntPtr Instrument_Handle, int Action); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CloseExtCal", CallingConvention = CallingConvention.StdCall)] + public static extern int CloseExtCal_64(System.IntPtr Instrument_Handle, int Action); + public static int CloseExtCal(System.IntPtr Instrument_Handle, int Action) + { + if (Is64BitProcess) + return CloseExtCal_64(Instrument_Handle, Action); + else + return CloseExtCal_32(Instrument_Handle, Action); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_self_test", CallingConvention = CallingConvention.StdCall)] + public static extern int self_test_32(System.IntPtr Instrument_Handle, out short Self_Test_Result, System.Text.StringBuilder Self_Test_Message); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_self_test", CallingConvention = CallingConvention.StdCall)] + public static extern int self_test_64(System.IntPtr Instrument_Handle, out short Self_Test_Result, System.Text.StringBuilder Self_Test_Message); + public static int self_test(System.IntPtr Instrument_Handle, out short Self_Test_Result, System.Text.StringBuilder Self_Test_Message) + { + if (Is64BitProcess) + return self_test_64(Instrument_Handle, out Self_Test_Result, Self_Test_Message); + else + return self_test_32(Instrument_Handle, out Self_Test_Result, Self_Test_Message); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_IsDone", CallingConvention = CallingConvention.StdCall)] + public static extern int IsDone_32(System.IntPtr Instrument_Handle, out ushort Done); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_IsDone", CallingConvention = CallingConvention.StdCall)] + public static extern int IsDone_64(System.IntPtr Instrument_Handle, out ushort Done); + public static int IsDone(System.IntPtr Instrument_Handle, out ushort Done) + { + if (Is64BitProcess) + return IsDone_64(Instrument_Handle, out Done); + else + return IsDone_32(Instrument_Handle, out Done); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_TristateChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int TristateChannels_32(System.IntPtr Instrument_Handle, string Channel_List, ushort Tristate); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_TristateChannels", CallingConvention = CallingConvention.StdCall)] + public static extern int TristateChannels_64(System.IntPtr Instrument_Handle, string Channel_List, ushort Tristate); + public static int TristateChannels(System.IntPtr Instrument_Handle, string Channel_List, ushort Tristate) + { + if (Is64BitProcess) + return TristateChannels_64(Instrument_Handle, Channel_List, Tristate); + else + return TristateChannels_32(Instrument_Handle, Channel_List, Tristate); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CommitDynamic", CallingConvention = CallingConvention.StdCall)] + public static extern int CommitDynamic_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CommitDynamic", CallingConvention = CallingConvention.StdCall)] + public static extern int CommitDynamic_64(System.IntPtr Instrument_Handle); + public static int CommitDynamic(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return CommitDynamic_64(Instrument_Handle); + else + return CommitDynamic_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CommitStatic", CallingConvention = CallingConvention.StdCall)] + public static extern int CommitStatic_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CommitStatic", CallingConvention = CallingConvention.StdCall)] + public static extern int CommitStatic_64(System.IntPtr Instrument_Handle); + public static int CommitStatic(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return CommitStatic_64(Instrument_Handle); + else + return CommitStatic_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_reset", CallingConvention = CallingConvention.StdCall)] + public static extern int reset_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_reset", CallingConvention = CallingConvention.StdCall)] + public static extern int reset_64(System.IntPtr Instrument_Handle); + public static int reset(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return reset_64(Instrument_Handle); + else + return reset_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ResetDevice", CallingConvention = CallingConvention.StdCall)] + public static extern int ResetDevice_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ResetDevice", CallingConvention = CallingConvention.StdCall)] + public static extern int ResetDevice_64(System.IntPtr Instrument_Handle); + public static int ResetDevice(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return ResetDevice_64(Instrument_Handle); + else + return ResetDevice_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_close", CallingConvention = CallingConvention.StdCall)] + public static extern int close_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_close", CallingConvention = CallingConvention.StdCall)] + public static extern int close_64(System.IntPtr Instrument_Handle); + public static int close(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return close_64(Instrument_Handle); + else + return close_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_error_message", CallingConvention = CallingConvention.StdCall)] + public static extern int error_message_32(System.IntPtr Instrument_Handle, int Error_Code, System.Text.StringBuilder Error_Message_2); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_error_message", CallingConvention = CallingConvention.StdCall)] + public static extern int error_message_64(System.IntPtr Instrument_Handle, int Error_Code, System.Text.StringBuilder Error_Message_2); + public static int error_message(System.IntPtr Instrument_Handle, int Error_Code, System.Text.StringBuilder Error_Message_2) + { + if (Is64BitProcess) + return error_message_64(Instrument_Handle, Error_Code, Error_Message_2); + else + return error_message_32(Instrument_Handle, Error_Code, Error_Message_2); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetAttributeViBoolean", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViBoolean_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out ushort Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetAttributeViBoolean", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViBoolean_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out ushort Value); + public static int GetAttributeViBoolean(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out ushort Value) + { + if (Is64BitProcess) + return GetAttributeViBoolean_64(Instrument_Handle, Channel_List, Attribute_ID, out Value); + else + return GetAttributeViBoolean_32(Instrument_Handle, Channel_List, Attribute_ID, out Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetAttributeViInt32", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViInt32_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out int Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetAttributeViInt32", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViInt32_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out int Value); + public static int GetAttributeViInt32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out int Value) + { + if (Is64BitProcess) + return GetAttributeViInt32_64(Instrument_Handle, Channel_List, Attribute_ID, out Value); + else + return GetAttributeViInt32_32(Instrument_Handle, Channel_List, Attribute_ID, out Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetAttributeViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViReal64_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out double Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetAttributeViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViReal64_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out double Value); + public static int GetAttributeViReal64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out double Value) + { + if (Is64BitProcess) + return GetAttributeViReal64_64(Instrument_Handle, Channel_List, Attribute_ID, out Value); + else + return GetAttributeViReal64_32(Instrument_Handle, Channel_List, Attribute_ID, out Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetAttributeViSession", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViSession_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out System.IntPtr Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetAttributeViSession", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViSession_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out System.IntPtr Value); + public static int GetAttributeViSession(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, out System.IntPtr Value) + { + if (Is64BitProcess) + return GetAttributeViSession_64(Instrument_Handle, Channel_List, Attribute_ID, out Value); + else + return GetAttributeViSession_32(Instrument_Handle, Channel_List, Attribute_ID, out Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetAttributeViString", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViString_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Buf_Size, System.Text.StringBuilder Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetAttributeViString", CallingConvention = CallingConvention.StdCall)] + public static extern int GetAttributeViString_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Buf_Size, System.Text.StringBuilder Value); + public static int GetAttributeViString(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Buf_Size, System.Text.StringBuilder Value) + { + if (Is64BitProcess) + return GetAttributeViString_64(Instrument_Handle, Channel_List, Attribute_ID, Buf_Size, Value); + else + return GetAttributeViString_32(Instrument_Handle, Channel_List, Attribute_ID, Buf_Size, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetAttributeViBoolean", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViBoolean_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, ushort Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetAttributeViBoolean", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViBoolean_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, ushort Value); + public static int SetAttributeViBoolean(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, ushort Value) + { + if (Is64BitProcess) + return SetAttributeViBoolean_64(Instrument_Handle, Channel_List, Attribute_ID, Value); + else + return SetAttributeViBoolean_32(Instrument_Handle, Channel_List, Attribute_ID, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetAttributeViInt32", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViInt32_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetAttributeViInt32", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViInt32_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Value); + public static int SetAttributeViInt32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, int Value) + { + if (Is64BitProcess) + return SetAttributeViInt32_64(Instrument_Handle, Channel_List, Attribute_ID, Value); + else + return SetAttributeViInt32_32(Instrument_Handle, Channel_List, Attribute_ID, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetAttributeViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViReal64_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, double Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetAttributeViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViReal64_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, double Value); + public static int SetAttributeViReal64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, double Value) + { + if (Is64BitProcess) + return SetAttributeViReal64_64(Instrument_Handle, Channel_List, Attribute_ID, Value); + else + return SetAttributeViReal64_32(Instrument_Handle, Channel_List, Attribute_ID, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetAttributeViSession", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViSession_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, System.IntPtr Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetAttributeViSession", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViSession_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, System.IntPtr Value); + public static int SetAttributeViSession(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, System.IntPtr Value) + { + if (Is64BitProcess) + return SetAttributeViSession_64(Instrument_Handle, Channel_List, Attribute_ID, Value); + else + return SetAttributeViSession_32(Instrument_Handle, Channel_List, Attribute_ID, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetAttributeViString", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViString_32(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, string Value); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetAttributeViString", CallingConvention = CallingConvention.StdCall)] + public static extern int SetAttributeViString_64(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, string Value); + public static int SetAttributeViString(System.IntPtr Instrument_Handle, string Channel_List, int Attribute_ID, string Value) + { + if (Is64BitProcess) + return SetAttributeViString_64(Instrument_Handle, Channel_List, Attribute_ID, Value); + else + return SetAttributeViString_32(Instrument_Handle, Channel_List, Attribute_ID, Value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetError", CallingConvention = CallingConvention.StdCall)] + public static extern int GetError_32(System.IntPtr Instrument_Handle, out int Error_Code, int Error_Description_Buffer_Size, System.Text.StringBuilder Error_Description); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetError", CallingConvention = CallingConvention.StdCall)] + public static extern int GetError_64(System.IntPtr Instrument_Handle, out int Error_Code, int Error_Description_Buffer_Size, System.Text.StringBuilder Error_Description); + public static int GetError(System.IntPtr Instrument_Handle, out int Error_Code, int Error_Description_Buffer_Size, System.Text.StringBuilder Error_Description) + { + if (Is64BitProcess) + return GetError_64(Instrument_Handle, out Error_Code, Error_Description_Buffer_Size, Error_Description); + else + return GetError_32(Instrument_Handle, out Error_Code, Error_Description_Buffer_Size, Error_Description); + } + + #region Added in 2.0 + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_WriteStaticPFIU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteStaticPFIU3232(System.IntPtr vi, uint writeData, uint channelMask); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_WriteStaticPFIU32", CallingConvention = CallingConvention.StdCall)] + public static extern int WriteStaticPFIU3264(System.IntPtr vi, uint writeData, uint channelMask); + + public static int WriteStaticPFIU32(System.IntPtr vi, uint writeData, uint channelMask) + { + if (Is64BitProcess) + return WriteStaticPFIU3264(vi, writeData, channelMask); + else + return WriteStaticPFIU3232(vi, writeData, channelMask); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadStaticPFIU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadStaticPFIU3232(System.IntPtr vi, out uint readData); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadStaticPFIU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadStaticPFIU3264(System.IntPtr vi, out uint readData); + + public static int ReadStaticPFIU32(System.IntPtr vi, out uint readData) + { + if (Is64BitProcess) + return ReadStaticPFIU3264(vi, out readData); + else + return ReadStaticPFIU3232(vi, out readData); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchStartTrigger32(System.IntPtr vi, string channelList, string pattern); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchStartTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchStartTrigger64(System.IntPtr vi, string channelList, string pattern); + + public static int ConfigureMultiSamplePatternMatchStartTrigger(System.IntPtr vi, string channelList, string pattern) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchStartTrigger64(vi, channelList, pattern); + else + return ConfigureMultiSamplePatternMatchStartTrigger32(vi, channelList, pattern); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchStartTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchStartTriggerU3232(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchStartTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchStartTriggerU3264(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns); + + public static int ConfigureMultiSamplePatternMatchStartTriggerU32(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchStartTriggerU3264(vi, channelList, patternArray, numberOfPatterns); + else + return ConfigureMultiSamplePatternMatchStartTriggerU3232(vi, channelList, patternArray, numberOfPatterns); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchAdvanceTrigger32(System.IntPtr vi, string channelList, string pattern); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchAdvanceTrigger64(System.IntPtr vi, string channelList, string pattern); + + public static int ConfigureMultiSamplePatternMatchAdvanceTrigger(System.IntPtr vi, string channelList, string pattern) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchAdvanceTrigger64(vi, channelList, pattern); + else + return ConfigureMultiSamplePatternMatchAdvanceTrigger32(vi, channelList, pattern); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchAdvanceTriggerU3232(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchAdvanceTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchAdvanceTriggerU3264(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns); + + public static int ConfigureMultiSamplePatternMatchAdvanceTriggerU32(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchAdvanceTriggerU3264(vi, channelList, patternArray, numberOfPatterns); + else + return ConfigureMultiSamplePatternMatchAdvanceTriggerU3232(vi, channelList, patternArray, numberOfPatterns); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchRefTrigger32(System.IntPtr vi, string channelList, string pattern, int pretriggerSamples); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchRefTrigger", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchRefTrigger64(System.IntPtr vi, string channelList, string pattern, int pretriggerSamples); + + public static int ConfigureMultiSamplePatternMatchRefTrigger(System.IntPtr vi, string channelList, string pattern, int pretriggerSamples) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchRefTrigger64(vi, channelList, pattern, pretriggerSamples); + else + return ConfigureMultiSamplePatternMatchRefTrigger32(vi, channelList, pattern, pretriggerSamples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchRefTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchRefTriggerU3232(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns, int pretriggerSamples); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ConfigureMultiSamplePatternMatchRefTriggerU32", CallingConvention = CallingConvention.StdCall)] + public static extern int ConfigureMultiSamplePatternMatchRefTriggerU3264(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns, int pretriggerSamples); + + public static int ConfigureMultiSamplePatternMatchRefTriggerU32(System.IntPtr vi, string channelList, uint[] patternArray, int numberOfPatterns, int pretriggerSamples) + { + if (Is64BitProcess) + return ConfigureMultiSamplePatternMatchRefTriggerU3264(vi, channelList, patternArray, numberOfPatterns, pretriggerSamples); + else + return ConfigureMultiSamplePatternMatchRefTriggerU3232(vi, channelList, patternArray, numberOfPatterns, pretriggerSamples); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalConfigureChannelState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalConfigureChannelState32(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalConfigureChannelState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalConfigureChannelState64(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference); + + public static int CalConfigureChannelState(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference) + { + if (Is64BitProcess) + return CalConfigureChannelState64(vi, channel, calibrationType, calibrationReference); + else + return CalConfigureChannelState32(vi, channel, calibrationType, calibrationReference); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalConfigureDeviceState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalConfigureDeviceState32(System.IntPtr vi, int connector, uint calibrationType, uint calibrationReference); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalConfigureDeviceState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalConfigureDeviceState64(System.IntPtr vi, int connector, uint calibrationType, uint calibrationReference); + + public static int CalConfigureDeviceState(System.IntPtr vi, int connector, uint calibrationType, uint calibrationReference) + { + if (Is64BitProcess) + return CalConfigureDeviceState64(vi, connector, calibrationType, calibrationReference); + else + return CalConfigureDeviceState32(vi, connector, calibrationType, calibrationReference); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalAdjustViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustViReal6432(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, double value); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalAdjustViReal64", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustViReal6464(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, double value); + + public static int CalAdjustViReal64(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, double value) + { + if (Is64BitProcess) + return CalAdjustViReal6464(vi, channel, calibrationType, calibrationReference, value); + else + return CalAdjustViReal6432(vi, channel, calibrationType, calibrationReference, value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalAdjustViReal64Array", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustViReal64Array32(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, int numberofValues, double[] value); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalAdjustViReal64Array", CallingConvention = CallingConvention.StdCall)] + public static extern int CalAdjustViReal64Array64(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, int numberofValues, double[] value); + + public static int CalAdjustViReal64Array(System.IntPtr vi, string channel, uint calibrationType, uint calibrationReference, int numberofValues, double[] value) + { + if (Is64BitProcess) + return CalAdjustViReal64Array64(vi, channel, calibrationType, calibrationReference, numberofValues, value); + else + return CalAdjustViReal64Array32(vi, channel, calibrationType, calibrationReference, numberofValues, value); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalClearState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalClearState32(System.IntPtr vi); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalClearState", CallingConvention = CallingConvention.StdCall)] + public static extern int CalClearState64(System.IntPtr vi); + + public static int CalClearState(System.IntPtr vi) + { + if (Is64BitProcess) + return CalClearState64(vi); + else + return CalClearState32(vi); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalInitChildSession", CallingConvention = CallingConvention.StdCall)] + public static extern int CalInitChildSession32(System.IntPtr vi, byte sessiontype, out System.IntPtr childsession); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalInitChildSession", CallingConvention = CallingConvention.StdCall)] + public static extern int CalInitChildSession64(System.IntPtr vi, byte sessiontype, out System.IntPtr childsession); + + public static int CalInitChildSession(System.IntPtr vi, byte sessiontype, out System.IntPtr childsession) + { + if (Is64BitProcess) + return CalInitChildSession64(vi, sessiontype, out childsession); + else + return CalInitChildSession32(vi, sessiontype, out childsession); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_CalCloseChildSession", CallingConvention = CallingConvention.StdCall)] + public static extern int CalCloseChildSession32(System.IntPtr vi, System.IntPtr childsession); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_CalCloseChildSession", CallingConvention = CallingConvention.StdCall)] + public static extern int CalCloseChildSession64(System.IntPtr vi, System.IntPtr childsession); + + public static int CalCloseChildSession(System.IntPtr vi, System.IntPtr childsession) + { + if (Is64BitProcess) + return CalCloseChildSession64(vi, childsession); + else + return CalCloseChildSession32(vi, childsession); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ReadCurrentTemperature", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadCurrentTemperature32(System.IntPtr vi, out double temperature); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ReadCurrentTemperature", CallingConvention = CallingConvention.StdCall)] + public static extern int ReadCurrentTemperature64(System.IntPtr vi, out double temperature); + + public static int ReadCurrentTemperature(System.IntPtr vi, out double temperature) + { + if (Is64BitProcess) + return ReadCurrentTemperature64(vi, out temperature); + else + return ReadCurrentTemperature32(vi, out temperature); + } + + #endregion + + #region Added in 15.0 + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_LockSession", CallingConvention = CallingConvention.StdCall)] + public static extern int LockSession_32(System.IntPtr Instrument_Handle, out ushort callerHasLock); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_LockSession", CallingConvention = CallingConvention.StdCall)] + public static extern int LockSession_64(System.IntPtr Instrument_Handle, out ushort callerHasLock); + public static int LockSession(System.IntPtr Instrument_Handle, out ushort callerHasLock) + { + if (Is64BitProcess) + return LockSession_64(Instrument_Handle, out callerHasLock); + else + return LockSession_32(Instrument_Handle, out callerHasLock); + } + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_UnlockSession", CallingConvention = CallingConvention.StdCall)] + public static extern int UnlockSession_32(System.IntPtr Instrument_Handle, out ushort callerHasLock); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_UnlockSession", CallingConvention = CallingConvention.StdCall)] + public static extern int UnlockSession_64(System.IntPtr Instrument_Handle, out ushort callerHasLock); + public static int UnlockSession(System.IntPtr Instrument_Handle, out ushort callerHasLock) + { + if (Is64BitProcess) + return UnlockSession_64(Instrument_Handle, out callerHasLock); + else + return UnlockSession_32(Instrument_Handle, out callerHasLock); + } + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ClearError", CallingConvention = CallingConvention.StdCall)] + public static extern int ClearError_32(System.IntPtr Instrument_Handle); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ClearError", CallingConvention = CallingConvention.StdCall)] + public static extern int ClearError_64(System.IntPtr Instrument_Handle); + public static int ClearError(System.IntPtr Instrument_Handle) + { + if (Is64BitProcess) + return ClearError_64(Instrument_Handle); + else + return ClearError_32(Instrument_Handle); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_ResetAttribute", CallingConvention = CallingConvention.StdCall)] + public static extern int ResetAttribute_32(System.IntPtr Instrument_Handle, string Channel_Name, int attributeId); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_ResetAttribute", CallingConvention = CallingConvention.StdCall)] + public static extern int ResetAttribute_64(System.IntPtr Instrument_Handle, string Channel_Name, int attributeId); + public static int ResetAttribute(System.IntPtr Instrument_Handle, string Channel_Name, int attributeId) + { + if (Is64BitProcess) + return ResetAttribute_64(Instrument_Handle, Channel_Name, attributeId); + else + return ResetAttribute_32(Instrument_Handle, Channel_Name, attributeId); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetFetchBacklog", CallingConvention = CallingConvention.StdCall)] + public static extern int GetFetchBacklog_32(System.IntPtr Instrument_Handle, int recordNumber, out int backLog); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetFetchBacklog", CallingConvention = CallingConvention.StdCall)] + public static extern int GetFetchBacklog_64(System.IntPtr Instrument_Handle, int recordNumber, out int backLog); + public static int GetFetchBacklog(System.IntPtr Instrument_Handle, int recordNumber, out int backLog) + { + if (Is64BitProcess) + return GetFetchBacklog_64(Instrument_Handle, recordNumber, out backLog); + else + return GetFetchBacklog_32(Instrument_Handle, recordNumber, out backLog); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetSelfCalSupported", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalSupported_32(System.IntPtr Instrument_Handle, out ushort callerHasLock); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetSelfCalSupported", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalSupported_64(System.IntPtr Instrument_Handle, out ushort callerHasLock); + public static int GetSelfCalSupported(System.IntPtr Instrument_Handle, out ushort callerHasLock) + { + if (Is64BitProcess) + return GetSelfCalSupported_64(Instrument_Handle, out callerHasLock); + else + return GetSelfCalSupported_32(Instrument_Handle, out callerHasLock); + } + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetSelfCalLastDateAndTime", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalLastDateAndTime_32(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetSelfCalLastDateAndTime", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalLastDateAndTime_64(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute); + public static int GetSelfCalLastDateAndTime(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute) + { + if (Is64BitProcess) + return GetSelfCalLastDateAndTime_64(Instrument_Handle, out year, out month, out day, out hour, out minute); + else + return GetSelfCalLastDateAndTime_32(Instrument_Handle, out year, out month, out day, out hour, out minute); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetExtCalLastDateAndTime", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalLastDateAndTime_32(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute); + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetExtCalLastDateAndTime", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalLastDateAndTime_64(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute); + public static int GetExtCalLastDateAndTime(System.IntPtr Instrument_Handle, out int year, out int month, out int day, out int hour, out int minute) + { + if (Is64BitProcess) + return GetExtCalLastDateAndTime_64(Instrument_Handle, out year, out month, out day, out hour, out minute); + else + return GetExtCalLastDateAndTime_32(Instrument_Handle, out year, out month, out day, out hour, out minute); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetSelfCalLastTemp", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalLastTemp_32(System.IntPtr Instrument_Handle, out double temp); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetSelfCalLastTemp", CallingConvention = CallingConvention.StdCall)] + public static extern int GetSelfCalLastTemp_64(System.IntPtr Instrument_Handle, out double temp); + public static int GetSelfCalLastTemp(System.IntPtr Instrument_Handle, out double temp) + { + if (Is64BitProcess) + return GetSelfCalLastTemp_64(Instrument_Handle, out temp); + else + return GetSelfCalLastTemp_32(Instrument_Handle, out temp); + } + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetExtCalLastTemp", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalLastTemp_32(System.IntPtr Instrument_Handle, out double temp); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetExtCalLastTemp", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalLastTemp_64(System.IntPtr Instrument_Handle, out double temp); + public static int GetExtCalLastTemp(System.IntPtr Instrument_Handle, out double temp) + { + if (Is64BitProcess) + return GetExtCalLastTemp_64(Instrument_Handle, out temp); + else + return GetExtCalLastTemp_32(Instrument_Handle, out temp); + } + + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetExtCalRecommendedInterval", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalRecommendedInterval_32(System.IntPtr Instrument_Handle, out int temp); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetExtCalRecommendedInterval", CallingConvention = CallingConvention.StdCall)] + public static extern int GetExtCalRecommendedInterval_64(System.IntPtr Instrument_Handle, out int temp); + public static int GetExtCalRecommendedInterval(System.IntPtr Instrument_Handle, out int temp) + { + if (Is64BitProcess) + return GetExtCalRecommendedInterval_64(Instrument_Handle, out temp); + else + return GetExtCalRecommendedInterval_32(Instrument_Handle, out temp); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetCalUserDefinedInfoMaxSize", CallingConvention = CallingConvention.StdCall)] + public static extern int GetCalUserDefinedInfoMaxSize_32(System.IntPtr Instrument_Handle, out int temp); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetCalUserDefinedInfoMaxSize", CallingConvention = CallingConvention.StdCall)] + public static extern int GetCalUserDefinedInfoMaxSize_64(System.IntPtr Instrument_Handle, out int temp); + public static int GetCalUserDefinedInfoMaxSize(System.IntPtr Instrument_Handle, out int temp) + { + if (Is64BitProcess) + return GetCalUserDefinedInfoMaxSize_64(Instrument_Handle, out temp); + else + return GetCalUserDefinedInfoMaxSize_32(Instrument_Handle, out temp); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_SetCalUserDefinedInfo", CallingConvention = CallingConvention.StdCall)] + public static extern int SetCalUserDefinedInfo32(System.IntPtr vi, string info); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_SetCalUserDefinedInfo", CallingConvention = CallingConvention.StdCall)] + public static extern int SetCalUserDefinedInfo64(System.IntPtr vi, string info); + + public static int SetCalUserDefinedInfo(System.IntPtr vi, string info) + { + if (Is64BitProcess) + return SetCalUserDefinedInfo64(vi, info); + else + return SetCalUserDefinedInfo32(vi, info); + } + + [DllImport(hsdioModuleName32, EntryPoint = "niHSDIO_GetCalUserDefinedInfo", CallingConvention = CallingConvention.StdCall)] + private static extern int GetCalUserDefinedInfo32(System.IntPtr vi, StringBuilder userdefinedinfo); + + [DllImport(hsdioModuleName64, EntryPoint = "niHSDIO_GetCalUserDefinedInfo", CallingConvention = CallingConvention.StdCall)] + private static extern int GetCalUserDefinedInfo64(System.IntPtr vi, StringBuilder userdefinedinfo); + + internal static int GetCalUserDefinedInfo(System.IntPtr vi, out string userdefinedinfo) + { + if (Is64BitProcess) + { + int userDefinedInfoBufferSize; + GetCalUserDefinedInfoMaxSize(vi, out userDefinedInfoBufferSize); + StringBuilder userdefinedinfoBuilder = new StringBuilder(userDefinedInfoBufferSize); + int val = GetCalUserDefinedInfo64(vi, userdefinedinfoBuilder); + userdefinedinfo = userdefinedinfoBuilder.ToString(); + return val; + } + else + { + int userDefinedInfoBufferSize; + GetCalUserDefinedInfoMaxSize(vi, out userDefinedInfoBufferSize); + StringBuilder userdefinedinfoBuilder = new StringBuilder(userDefinedInfoBufferSize); + int val = GetCalUserDefinedInfo32(vi, userdefinedinfoBuilder); + userdefinedinfo = userdefinedinfoBuilder.ToString(); + return val; + } + } + + #endregion + + public static int TestForError(System.IntPtr handle, int status) + { + if ((status < 0)) + { + PInvoke.ThrowError(handle, status); + } + return status; + } + public static int ThrowError(System.IntPtr handle, int code) + { + int status = 0; + int size = PInvoke.GetError(handle, out status, 0, null); + System.Text.StringBuilder msg = new System.Text.StringBuilder(); + if ((size >= 0)) + { + msg.Capacity = size; + PInvoke.GetError(handle, out status, size, msg); + } + + throw new System.Runtime.InteropServices.ExternalException(msg.ToString(), code); + } + } + } + /// + /// + /// + public enum niHSDIOProperties + { + + /// + /// System.int + /// + LogicalName = 1050305, + /// + /// System.int + /// + DynamicChannels = 1150002, + /// + /// System.int + /// + StaticChannels = 1150003, + /// + /// System.int + /// + TotalAcquisitionMemorySize = 1150073, + /// + /// System.int + /// + TotalGenerationMemorySize = 1150074, + /// + /// System.int + /// + SerialNumber = 1150096, + /// + /// System.int + /// + PpmuCapableIoSwitchControl = 1150180, + /// + /// System.int + /// + AttributeCommittalStrategy = 1150182, + /// + /// System.int + /// + DataVoltageLowLevel = 1150006, + /// + /// System.int + /// + DataVoltageHighLevel = 1150007, + /// + /// System.int + /// + DataTerminationVoltageLevel = 1150161, + /// + /// System.int + /// + DataVoltageRange = 1150163, + /// + /// System.int + /// + TriggerVoltageLowLevel = 1150008, + /// + /// System.int + /// + TriggerVoltageHighLevel = 1150009, + /// + /// System.int + /// + EventVoltageLowLevel = 1150079, + /// + /// System.int + /// + EventVoltageHighLevel = 1150080, + /// + /// System.int + /// + DataInterpretation = 1150010, + /// + /// System.int + /// + InputImpedance = 1150070, + /// + /// System.int + /// + DriveType = 1150139, + /// + /// System.int + /// + DataTristateMode = 1150160, + /// + /// System.int + /// + DataTerminationMode = 1150175, + /// + /// System.int + /// + ActiveLoadMode = 1150176, + /// + /// System.int + /// + ActiveLoadSourcingCurrentValue = 1150177, + /// + /// System.int + /// + ActiveLoadSinkingCurrentValue = 1150178, + /// + /// System.int + /// + ActiveLoadCommutatingVoltageLevel = 1150179, + /// + /// System.int + /// + RefClockSource = 1150011, + /// + /// System.int + /// + RefClockRate = 1150012, + /// + /// System.int + /// + RefClockImpedance = 1150058, + /// + /// System.int + /// + ExportedRefClockOutputTerminal = 1150059, + /// + /// System.int + /// + SampleClockSource = 1150013, + /// + /// System.int + /// + SampleClockRate = 1150014, + /// + /// System.int + /// + SampleClockImpedance = 1150060, + /// + /// System.int + /// + ExportedSampleClockMode = 1150061, + /// + /// System.int + /// + ExportedSampleClockDelay = 1150062, + /// + /// System.int + /// + ExportedSampleClockOutputTerminal = 1150063, + /// + /// System.int + /// + ExportedSampleClockOffset = 1150083, + /// + /// System.int + /// + ExportedOnboardRefClockOutputTerminal = 1150085, + /// + /// System.int + /// + StartTriggerType = 1150032, + /// + /// System.int + /// + DigitalEdgeStartTriggerSource = 1150033, + /// + /// System.int + /// + DigitalEdgeStartTriggerEdge = 1150034, + /// + /// System.int + /// + DigitalEdgeStartTriggerImpedance = 1150001, + /// + /// System.int + /// + DigitalEdgeStartTriggerPosition = 1150075, + /// + /// System.int + /// + DigitalEdgeStartTriggerTerminalConfiguration = 1150098, + /// + /// System.int + /// + PatternMatchStartTriggerPattern = 1150035, + /// + /// System.int + /// + PatternMatchStartTriggerWhen = 1150036, + /// + /// System.int + /// + ExportedStartTriggerOutputTerminal = 1150037, + /// + /// System.int + /// + ExportedStartTriggerTerminalConfiguration = 1150118, + /// + /// System.int + /// + RefTriggerType = 1150038, + /// + /// System.int + /// + DigitalEdgeRefTriggerSource = 1150039, + /// + /// System.int + /// + DigitalEdgeRefTriggerEdge = 1150040, + /// + /// System.int + /// + DigitalEdgeRefTriggerImpedance = 1150004, + /// + /// System.int + /// + DigitalEdgeRefTriggerPosition = 1150077, + /// + /// System.int + /// + DigitalEdgeRefTriggerTerminalConfiguration = 1150099, + /// + /// System.int + /// + PatternMatchRefTriggerPattern = 1150041, + /// + /// System.int + /// + PatternMatchRefTriggerWhen = 1150042, + /// + /// System.int + /// + ExportedRefTriggerOutputTerminal = 1150043, + /// + /// System.int + /// + ExportedRefTriggerTerminalConfiguration = 1150119, + /// + /// System.int + /// + StartToRefTriggerHoldoff = 1150086, + /// + /// System.int + /// + RefToRefTriggerHoldoff = 1150129, + /// + /// System.int + /// + ScriptTriggerType = 1150044, + /// + /// System.int + /// + DigitalEdgeScriptTriggerSource = 1150045, + /// + /// System.int + /// + DigitalEdgeScriptTriggerEdge = 1150046, + /// + /// System.int + /// + DigitalEdgeScriptTriggerImpedance = 1150005, + /// + /// System.int + /// + DigitalEdgeScriptTriggerTerminalConfiguration = 1150100, + /// + /// System.int + /// + DigitalLevelScriptTriggerSource = 1150047, + /// + /// System.int + /// + DigitalLevelScriptTriggerWhen = 1150048, + /// + /// System.int + /// + DigitalLevelScriptTriggerImpedance = 1150105, + /// + /// System.int + /// + DigitalLevelScriptTriggerTerminalConfiguration = 1150106, + /// + /// System.int + /// + ExportedScriptTriggerOutputTerminal = 1150049, + /// + /// System.int + /// + ExportedScriptTriggerTerminalConfiguration = 1150120, + /// + /// System.int + /// + PauseTriggerType = 1150050, + /// + /// System.int + /// + DigitalLevelPauseTriggerSource = 1150051, + /// + /// System.int + /// + DigitalLevelPauseTriggerWhen = 1150052, + /// + /// System.int + /// + DigitalLevelPauseTriggerImpedance = 1150015, + /// + /// System.int + /// + DigitalLevelPauseTriggerPosition = 1150087, + /// + /// System.int + /// + DigitalLevelPauseTriggerTerminalConfiguration = 1150101, + /// + /// System.int + /// + PatternMatchPauseTriggerPattern = 1150053, + /// + /// System.int + /// + PatternMatchPauseTriggerWhen = 1150054, + /// + /// System.int + /// + ExportedPauseTriggerOutputTerminal = 1150055, + /// + /// System.int + /// + ExportedPauseTriggerTerminalConfiguration = 1150121, + /// + /// System.int + /// + AdvanceTriggerType = 1150088, + /// + /// System.int + /// + DigitalEdgeAdvanceTriggerSource = 1150089, + /// + /// System.int + /// + DigitalEdgeAdvanceTriggerEdge = 1150090, + /// + /// System.int + /// + DigitalEdgeAdvanceTriggerImpedance = 1150095, + /// + /// System.int + /// + DigitalEdgeAdvanceTriggerPosition = 1150093, + /// + /// System.int + /// + DigitalEdgeAdvanceTriggerTerminalConfiguration = 1150107, + /// + /// System.int + /// + PatternMatchAdvanceTriggerPattern = 1150091, + /// + /// System.int + /// + PatternMatchAdvanceTriggerWhen = 1150092, + /// + /// System.int + /// + ExportedAdvanceTriggerOutputTerminal = 1150094, + /// + /// System.int + /// + ExportedAdvanceTriggerTerminalConfiguration = 1150122, + /// + /// System.int + /// + StopTriggerType = 1150152, + /// + /// System.int + /// + DigitalEdgeStopTriggerSource = 1150153, + /// + /// System.int + /// + DigitalEdgeStopTriggerEdge = 1150154, + /// + /// System.int + /// + DigitalEdgeStopTriggerTerminalConfiguration = 1150155, + /// + /// System.int + /// + DigitalEdgeStopTriggerImpedance = 1150156, + /// + /// System.int + /// + ExportedStopTriggerOutputTerminal = 1150157, + /// + /// System.int + /// + ExportedStopTriggerTerminalConfiguration = 1150158, + /// + /// System.int + /// + ReadyForStartEventOutputTerminal = 1150016, + /// + /// System.int + /// + ReadyForStartEventLevelActiveLevel = 1150017, + /// + /// System.int + /// + ReadyForStartEventTerminalConfiguration = 1150102, + /// + /// System.int + /// + DataActiveEventOutputTerminal = 1150019, + /// + /// System.int + /// + DataActiveEventLevelActiveLevel = 1150020, + /// + /// System.int + /// + DataActiveEventPosition = 1150081, + /// + /// System.int + /// + DataActiveEventTerminalConfiguration = 1150103, + /// + /// System.int + /// + MarkerEventOutputTerminal = 1150022, + /// + /// System.int + /// + MarkerEventPulsePolarity = 1150023, + /// + /// System.int + /// + MarkerEventPosition = 1150082, + /// + /// System.int + /// + MarkerEventTerminalConfiguration = 1150104, + /// + /// System.int + /// + ReadyForAdvanceEventOutputTerminal = 1150109, + /// + /// System.int + /// + ReadyForAdvanceEventLevelActiveLevel = 1150110, + /// + /// System.int + /// + ReadyForAdvanceEventTerminalConfiguration = 1150111, + /// + /// System.int + /// + EndOfRecordEventOutputTerminal = 1150112, + /// + /// System.int + /// + EndOfRecordEventPulsePolarity = 1150113, + /// + /// System.int + /// + EndOfRecordEventTerminalConfiguration = 1150114, + /// + /// System.int + /// + HwcSampleErrorEventOutputTerminal = 1150136, + /// + /// System.int + /// + GenerationMode = 1150025, + /// + /// System.int + /// + RepeatMode = 1150026, + /// + /// System.int + /// + RepeatCount = 1150071, + /// + /// System.int + /// + WaveformToGenerate = 1150027, + /// + /// System.int + /// + ScriptToGenerate = 1150028, + /// + /// System.int + /// + InitialState = 1150064, + /// + /// System.int + /// + IdleState = 1150065, + /// + /// System.int + /// + DataTransferBlockSize = 1150144, + /// + /// System.int + /// + SamplesPerRecord = 1150029, + /// + /// System.int + /// + NumRecords = 1150126, + /// + /// System.int + /// + RefTriggerPretriggerSamples = 1150030, + /// + /// System.int + /// + FetchBacklog = 1150031, + /// + /// System.int + /// + FetchRelativeTo = 1150067, + /// + /// System.int + /// + FetchOffset = 1150068, + /// + /// System.int + /// + RecordsDone = 1150125, + /// + /// System.int + /// + DataActiveInternalRouteDelay = 1150138, + /// + /// System.int + /// + SamplesPerRecordIsFinite = 1150159, + /// + /// System.int + /// + DataPosition = 1150056, + /// + /// System.int + /// + DataPositionDelay = 1150057, + /// + /// System.int + /// + DataDeskew = 1150162, + /// + /// System.int + /// + TriggerPositionDelay = 1150164, + /// + /// System.int + /// + TriggerDeskew = 1150165, + /// + /// System.int + /// + EventPositionDelay = 1150166, + /// + /// System.int + /// + EventDeskew = 1150167, + /// + /// System.int + /// + DataWidth = 1150108, + /// + /// System.int + /// + DataRateMultiplier = 1150128, + /// + /// System.int + /// + SupportedDataStates = 1150130, + /// + /// System.int + /// + OscillatorPhaseDacValue = 1150072, + /// + /// System.int + /// + HwcSampleErrorBacklog = 1150132, + /// + /// System.int + /// + HwcNumSampleErrors = 1150133, + /// + /// System.int + /// + HwcSamplesCompared = 1150134, + /// + /// System.int + /// + HwcCumulativeErrorBits = 1150181, + /// + /// System.int + /// + HwcFilterRepeatedSampleErrors = 1150140, + /// + /// System.int + /// + HwcSampleErrorBufferOverflowed = 1150135, + /// + /// System.int + /// + SpaceAvailableInStreamingWaveform = 1150141, + /// + /// System.int + /// + StreamingWaveformName = 1150142, + /// + /// System.int + /// + StreamingEnabled = 1150143, + /// + /// System.int + /// + DirectDmaEnabled = 1150146, + /// + /// System.int + /// + DirectDmaWindowSize = 1150147, + /// + /// System.int + /// + DirectDmaWindowAddress = 1150148, + /// + /// System.int + /// + DataTransferMaximumBandwidth = 1150149, + /// + /// System.int + /// + DataTransferPreferredPacketSize = 1150150, + /// + /// System.int + /// + DataTransferMaximumInFlightReads = 1150151, + /// + /// System.int + /// + DevicePowerConsumption = 1150170, + /// + /// System.int + /// + DevicePeakPowerConsumed = 1150171, + /// + /// System.int + /// + DeviceSerialNumber = 1150084, + /// + /// System.int + /// + StartTriggerImpedance = 1150001, + /// + /// System.int + /// + RefTriggerImpedance = 1150004, + /// + /// System.int + /// + ScriptTriggerImpedance = 1150005, + /// + /// System.int + /// + PauseTriggerImpedance = 1150015, + /// + /// System.int + /// + AdvanceTriggerImpedance = 1150095, + /// + /// System.int + /// + StartTriggerPosition = 1150075, + /// + /// System.int + /// + RefTriggerPosition = 1150077, + /// + /// System.int + /// + PauseTriggerPosition = 1150087, + /// + /// System.int + /// + AdvanceTriggerPosition = 1150093, + /// + /// System.int + /// + HwcHardwareCompareMode = 1150130, + /// + /// System.int + /// + DaqmxTask = 1150069, + /// + /// System.int + /// + TriggerVoltageRange = 1150172, + /// + /// System.int + /// + EventVoltageRange = 1150173, + /// + /// System.int + /// + ClockVoltageRange = 1150174, + /// + /// System.int + /// + ClockVoltageLowLevel = 1150168, + /// + /// System.int + /// + ClockVoltageHighLevel = 1150169 + } + /// + /// + /// + public class niHSDIOConstants + { + /// + /// + /// + public const int _50vLogic = 5; + /// + /// + /// + public const int _33vLogic = 6; + /// + /// + /// + public const int _25vLogic = 7; + /// + /// + /// + public const int _18vLogic = 8; + /// + /// + /// + public const int _15vLogic = 80; + /// + /// + /// + public const int _12vLogic = 81; + /// + /// + /// + public const int HighOrLow = 3; + /// + /// + /// + public const int ValidOrInvalid = 4; + /// + /// + /// + public const int GroupBySample = 71; + /// + /// + /// + public const int GroupByChannel = 72; + /// + /// + /// + public const int Finite = 16; + /// + /// + /// + public const int Continuous = 17; + /// + /// + /// + public const int CurrentPosition = 45; + /// + /// + /// + public const int StartOfWaveform = 44; + /// + /// + /// + public const int Waveform = 14; + /// + /// + /// + public const int Scripted = 15; + /// + /// + /// + public const string OnBoardClockStr = "OnBoardClock"; + /// + /// + /// + public const string ClkInStr = "ClkIn"; + /// + /// + /// + public const string PxiStarStr = "PXI_STAR"; + /// + /// + /// + public const string StrobeStr = "STROBE"; + /// + /// + /// + public const int SampleClockRisingEdge = 18; + /// + /// + /// + public const int SampleClockFallingEdge = 19; + /// + /// + /// + public const int DelayFromSampleClockRisingEdge = 20; + /// + /// + /// + public const string NoneStr = "None"; + /// + /// + /// + public const string PxiClk10Str = "PXI_CLK10"; + /// + /// + /// + public const string PxiClkStr = "PXI_CLK"; + /// + /// + /// + public const string Rtsi7Str = "RTSI7"; + /// + /// + /// + public const string Pfi0Str = "PFI0"; + /// + /// + /// + public const string Pfi1Str = "PFI1"; + /// + /// + /// + public const string Pfi2Str = "PFI2"; + /// + /// + /// + public const string Pfi3Str = "PFI3"; + /// + /// + /// + public const string PxiTrig0Str = "PXI_Trig0"; + /// + /// + /// + public const string PxiTrig1Str = "PXI_Trig1"; + /// + /// + /// + public const string PxiTrig2Str = "PXI_Trig2"; + /// + /// + /// + public const string PxiTrig3Str = "PXI_Trig3"; + /// + /// + /// + public const string PxiTrig4Str = "PXI_Trig4"; + /// + /// + /// + public const string PxiTrig5Str = "PXI_Trig5"; + /// + /// + /// + public const string PxiTrig6Str = "PXI_Trig6"; + /// + /// + /// + public const string PxiTrig7Str = "PXI_Trig7"; + /// + /// + /// + public const int RisingEdge = 12; + /// + /// + /// + public const int FallingEdge = 13; + /// + /// + /// + public const int PatternMatches = 36; + /// + /// + /// + public const int PatternDoesNotMatch = 37; + /// + /// + /// + public const string ScriptTrigger0 = "scriptTrigger0"; + /// + /// + /// + public const string ScriptTrigger1 = "scriptTrigger1"; + /// + /// + /// + public const string ScriptTrigger2 = "scriptTrigger2"; + /// + /// + /// + public const string ScriptTrigger3 = "scriptTrigger3"; + /// + /// + /// + public const int High = 34; + /// + /// + /// + public const int Low = 35; + /// + /// + /// + public const int StartTrigger = 53; + /// + /// + /// + public const int RefTrigger = 54; + /// + /// + /// + public const int AdvanceTrigger = 61; + /// + /// + /// + public const int ScriptTrigger = 58; + /// + /// + /// + public const int StopTrigger = 82; + /// + /// + /// + public const int SampleClock = 51; + /// + /// + /// + public const int RefClock = 52; + /// + /// + /// + public const int PauseTrigger = 57; + /// + /// + /// + public const int DataActiveEvent = 55; + /// + /// + /// + public const int MarkerEvent = 59; + /// + /// + /// + public const int ReadyForStartEvent = 56; + /// + /// + /// + public const int ReadyForAdvanceEvent = 66; + /// + /// + /// + public const int EndOfRecordEvent = 68; + /// + /// + /// + public const int OnboardRefClock = 60; + /// + /// + /// + public const string DoNotExportStr = ""; + /// + /// + /// + public const string ClkOutStr = "ClkOut"; + /// + /// + /// + public const string DdcClkOutStr = "DDC_ClkOut"; + /// + /// + /// + public const string MarkerEvent0 = "marker0"; + /// + /// + /// + public const string MarkerEvent1 = "marker1"; + /// + /// + /// + public const string MarkerEvent2 = "marker2"; + /// + /// + /// + public const string MarkerEvent3 = "marker3"; + /// + /// + /// + public const int StpmuLocalSense = 88; + /// + /// + /// + public const int StpmuRemoteSense = 89; + /// + /// + /// + public const int StpmuReturnToTristate = 90; + /// + /// + /// + public const int StpmuReturnToPrevious = 91; + /// + /// + /// + public const int StpmuConnectExternal = 92; + /// + /// + /// + public const int StpmuDisconnectExternal = 93; + /// + /// + /// + public const int StpmuAuxIoConnector = 94; + /// + /// + /// + public const int StpmuRemoteSenseConnector = 95; + /// + /// + /// + public const int ExtCalCommit = 62; + /// + /// + /// + public const int ExtCalCancel = 63; + + #region Added in 2.0 + /// + /// + /// + public const int ActiveLoadDisabled = 96; + /// + /// + /// + public const int ActiveLoadEnabledWhenTristate = 97; + /// + /// + /// + public const int Connect = 98; + /// + /// + /// + public const int Disconnect = 99; + /// + /// + /// + public const int CalibrationChildSessionTypeAcquisition = 0; + /// + /// + /// + public const int CalibrationChildSessionTypeGeneration = 1; + /// + /// + /// + public const int CalibrationTypeUnconfigured = 0; + /// + /// + /// + public const int CalibrationTypeVoltageReferenceAdjust = 1; + /// + /// + /// + public const int CalibrationTypeSourceResisterAdjust = 2; + /// + /// + /// + public const int CalibrationTypeSinkResisterAdjust = 3; + /// + /// + /// + public const int CalibrationTypeCaliberationPulseAdjust = 4; + /// + /// + /// + public const int CalibrationTypeInputChannelSkewAccuracyVerify = 5; + /// + /// + /// + public const int CalibrationTypeOutputChannelSkewAccuracyVerify = 6; + /// + /// + /// + public const int CalibrationTypeInputVoltageAccuracyVerify = 7; + /// + /// + /// + public const int CalibrationTypeOutputVoltageAccuracyVerify = 8; + /// + /// + /// + public const int CalibrationTypeInputChannelSkewAdjust = 9; + /// + /// + /// + public const int CalibrationTypeOutputChannelSkewAdjust = 10; + /// + /// + /// + public const int DefferedUntilCommit = 0; + /// + /// + /// + public const int ImmediatelyUponSetVoltage = 1; + /// + /// + /// + public const string PFI4Str = "PFI4"; + /// + /// + /// + public const string PFI5Str = "PFI5"; + /// + /// + /// + public const string PFI24Str = "PFI24"; + /// + /// + /// + public const string PFI25Str = "PFI25"; + /// + /// + /// + public const string PFI26Str = "PFI26"; + /// + /// + /// + public const string PFI27Str = "PFI27"; + /// + /// + /// + public const string PFI28Str = "PFI28"; + /// + /// + /// + public const string PFI29Str = "PFI29"; + /// + /// + /// + public const string PFI30Str = "PFI30"; + /// + /// + /// + public const string PFI31Str = "PFI31"; + + #endregion + + #region Missing Constants Added + /// + /// + /// + public const int ActiveDrive = 75; + /// + /// + /// + public const int OpenCollector = 76; + /// + /// + /// + public const int Minus2To6VoltageRange = 86; + /// + /// + /// + public const int Minus1To7VoltageRange = 87; + /// + /// + /// + public const int HighImpedance = 84; + /// + /// + /// + public const int DriveTerminationVoltage = 85; + /// + /// + /// + public const int MatchLow = 0; + /// + /// + /// + public const int MatchHigh = 1; + /// + /// + /// + public const int Ignore = 33; + /// + /// + /// + public const int ActiveHigh = 10; + /// + /// + /// + public const int ActiveLow = 11; + /// + /// + /// + public const int Noninverted = 21; + /// + /// + /// + public const int Inverted = 22; + /// + /// + /// + public const int Delayed = 23; + /// + /// + /// + public const int Tristate = 24; + /// + /// + /// + public const int LogicHigh = 1; + /// + /// + /// + public const int LogicLow = 0; + /// + /// + /// + public const int HoldLastValue = 27; + /// + /// + /// + public const int None = 28; + /// + /// + /// + public const int DigitalEdge = 29; + /// + /// + /// + public const int DigitalLevel = 30; + /// + /// + /// + public const int Software = 32; + /// + /// + /// + public const int PatternMatch = 31; + /// + /// + /// + public const int MostRecentSample = 46; + /// + /// + /// + public const int FirstSample = 47; + /// + /// + /// + public const int ReferenceTrigger = 48; + /// + /// + /// + public const int FirstPretriggerSample = 49; + /// + /// + /// + public const int CurrentReadPosition = 50; + /// + /// + /// + public const int TimestampAbsolute = 69; + /// + /// + /// + public const int TimestampRelative = 70; + /// + /// + /// + public const int Lvds = 64; + /// + /// + /// + public const int SingleEnded = 65; + /// + /// + /// + public const int SingleDataRate = 1; + /// + /// + /// + public const int DoubleDataRate = 2; + /// + /// + /// + public const int States01 = 77; + /// + /// + /// + public const int States01Z = 83; + /// + /// + /// + public const int States01ZLHX = 78; + /// + /// + /// + public const int StatesLHX = 79; + /// + /// + /// + public const string Rtsi0Str = "RTSI0"; + /// + /// + /// + public const string Rtsi1Str = "RTSI1"; + /// + /// + /// + public const string Rtsi2Str = "RTSI2"; + /// + /// + /// + public const string Rtsi3Str = "RTSI3"; + /// + /// + /// + public const string Rtsi4Str = "RTSI4"; + /// + /// + /// + public const string Rtsi5Str = "RTSI5"; + /// + /// + /// + public const string RtsiStr = "RTSI6"; + /// + /// + /// + public const string PxieDstarbStr = "PXIe_DStarB"; + + #endregion + } +} diff --git a/DAQ/packages.config b/DAQ/packages.config new file mode 100644 index 00000000..d73e3955 --- /dev/null +++ b/DAQ/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DecelerationHardwareControl/ControlWindow.Designer.cs b/DecelerationHardwareControl/ControlWindow.Designer.cs index da2de2dc..9bd21d8c 100644 --- a/DecelerationHardwareControl/ControlWindow.Designer.cs +++ b/DecelerationHardwareControl/ControlWindow.Designer.cs @@ -1,887 +1,887 @@ -namespace DecelerationHardwareControl -{ - partial class ControlWindow - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label3 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.printDialog1 = new System.Windows.Forms.PrintDialog(); - this.sideBandTab = new System.Windows.Forms.TabPage(); - this.scatterGraph6 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot6 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis6 = new NationalInstruments.UI.XAxis(); - this.yAxis6 = new NationalInstruments.UI.YAxis(); - this.scatterGraph5 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot5 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis5 = new NationalInstruments.UI.XAxis(); - this.yAxis5 = new NationalInstruments.UI.YAxis(); - this.scatterGraph4 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot4 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis4 = new NationalInstruments.UI.XAxis(); - this.yAxis4 = new NationalInstruments.UI.YAxis(); - this.scatterGraph3 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot3 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis3 = new NationalInstruments.UI.XAxis(); - this.yAxis3 = new NationalInstruments.UI.YAxis(); - this.scatterGraph2 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot2 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis2 = new NationalInstruments.UI.XAxis(); - this.yAxis2 = new NationalInstruments.UI.YAxis(); - this.scatterGraph1 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); - this.scatterPlot1 = new NationalInstruments.UI.ScatterPlot(); - this.xAxis1 = new NationalInstruments.UI.XAxis(); - this.yAxis1 = new NationalInstruments.UI.YAxis(); - this.stopReadingSidebandsButton = new System.Windows.Forms.Button(); - this.readSidebandsButton = new System.Windows.Forms.Button(); - this.FlowController = new System.Windows.Forms.TabPage(); - this.ReturnBox = new System.Windows.Forms.TextBox(); - this.CommandBox = new System.Windows.Forms.TextBox(); - this.SetFlow = new System.Windows.Forms.Button(); - this.ReadFlow = new System.Windows.Forms.Button(); - this.MonitoringTab = new System.Windows.Forms.TabPage(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.monitorColdPlate = new System.Windows.Forms.TextBox(); - this.monitorShield = new System.Windows.Forms.TextBox(); - this.monitor10KTherm30KPlate = new System.Windows.Forms.TextBox(); - this.monitorRoughVacuum = new System.Windows.Forms.TextBox(); - this.monitorPressureSourceChamber = new System.Windows.Forms.TextBox(); - this.GetData = new System.Windows.Forms.Button(); - this.PressureSourceChamber = new System.Windows.Forms.Label(); - this.FrequencyTab = new System.Windows.Forms.TabPage(); - this.aom1Box = new System.Windows.Forms.GroupBox(); - this.aom1UpdateButton = new System.Windows.Forms.Button(); - this.label18 = new System.Windows.Forms.Label(); - this.aom1AmplitudeBox = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.aom1FreqBox = new System.Windows.Forms.TextBox(); - this.label15 = new System.Windows.Forms.Label(); - this.microwaveSynthGroupBox = new System.Windows.Forms.GroupBox(); - this.label8 = new System.Windows.Forms.Label(); - this.synthSettingsUpdateButton = new System.Windows.Forms.Button(); - this.synthOnFreqBox = new System.Windows.Forms.TextBox(); - this.synthOnCheck = new System.Windows.Forms.CheckBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.synthOnAmpBox = new System.Windows.Forms.TextBox(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.sideBandTab.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph6)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph5)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).BeginInit(); - this.FlowController.SuspendLayout(); - this.MonitoringTab.SuspendLayout(); - this.FrequencyTab.SuspendLayout(); - this.aom1Box.SuspendLayout(); - this.microwaveSynthGroupBox.SuspendLayout(); - this.tabControl.SuspendLayout(); - this.SuspendLayout(); - // - // label3 - // - this.label3.Location = new System.Drawing.Point(0, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 23); - this.label3.TabIndex = 0; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(0, 0); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 0; - // - // printDialog1 - // - this.printDialog1.UseEXDialog = true; - // - // sideBandTab - // - this.sideBandTab.Controls.Add(this.scatterGraph6); - this.sideBandTab.Controls.Add(this.scatterGraph5); - this.sideBandTab.Controls.Add(this.scatterGraph4); - this.sideBandTab.Controls.Add(this.scatterGraph3); - this.sideBandTab.Controls.Add(this.scatterGraph2); - this.sideBandTab.Controls.Add(this.scatterGraph1); - this.sideBandTab.Controls.Add(this.stopReadingSidebandsButton); - this.sideBandTab.Controls.Add(this.readSidebandsButton); - this.sideBandTab.Location = new System.Drawing.Point(4, 22); - this.sideBandTab.Name = "sideBandTab"; - this.sideBandTab.Padding = new System.Windows.Forms.Padding(3); - this.sideBandTab.Size = new System.Drawing.Size(680, 855); - this.sideBandTab.TabIndex = 6; - this.sideBandTab.Text = "Sidebands"; - this.sideBandTab.UseVisualStyleBackColor = true; - this.sideBandTab.Click += new System.EventHandler(this.sideBandTab_Click); - // - // scatterGraph6 - // - this.scatterGraph6.Caption = "Slowing V1 628"; - this.scatterGraph6.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph6.Location = new System.Drawing.Point(19, 679); - this.scatterGraph6.Name = "scatterGraph6"; - this.scatterGraph6.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot6}); - this.scatterGraph6.Size = new System.Drawing.Size(651, 127); - this.scatterGraph6.TabIndex = 12; - this.scatterGraph6.UseColorGenerator = true; - this.scatterGraph6.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis6}); - this.scatterGraph6.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis6}); - // - // scatterPlot6 - // - this.scatterPlot6.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot6.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot6.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot6.XAxis = this.xAxis6; - this.scatterPlot6.YAxis = this.yAxis6; - // - // xAxis6 - // - this.xAxis6.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // scatterGraph5 - // - this.scatterGraph5.Caption = "Slowing 531"; - this.scatterGraph5.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph5.Location = new System.Drawing.Point(19, 546); - this.scatterGraph5.Name = "scatterGraph5"; - this.scatterGraph5.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot5}); - this.scatterGraph5.Size = new System.Drawing.Size(651, 127); - this.scatterGraph5.TabIndex = 11; - this.scatterGraph5.UseColorGenerator = true; - this.scatterGraph5.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis5}); - this.scatterGraph5.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis5}); - // - // scatterPlot5 - // - this.scatterPlot5.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot5.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot5.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot5.XAxis = this.xAxis5; - this.scatterPlot5.YAxis = this.yAxis5; - // - // xAxis5 - // - this.xAxis5.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // scatterGraph4 - // - this.scatterGraph4.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph4.Location = new System.Drawing.Point(19, 413); - this.scatterGraph4.Name = "scatterGraph4"; - this.scatterGraph4.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot4}); - this.scatterGraph4.Size = new System.Drawing.Size(651, 127); - this.scatterGraph4.TabIndex = 10; - this.scatterGraph4.UseColorGenerator = true; - this.scatterGraph4.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis4}); - this.scatterGraph4.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis4}); - // - // scatterPlot4 - // - this.scatterPlot4.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot4.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot4.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot4.XAxis = this.xAxis4; - this.scatterPlot4.YAxis = this.yAxis4; - // - // xAxis4 - // - this.xAxis4.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // scatterGraph3 - // - this.scatterGraph3.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph3.Location = new System.Drawing.Point(19, 280); - this.scatterGraph3.Name = "scatterGraph3"; - this.scatterGraph3.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot3}); - this.scatterGraph3.Size = new System.Drawing.Size(651, 127); - this.scatterGraph3.TabIndex = 9; - this.scatterGraph3.UseColorGenerator = true; - this.scatterGraph3.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis3}); - this.scatterGraph3.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis3}); - // - // scatterPlot3 - // - this.scatterPlot3.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot3.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot3.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot3.XAxis = this.xAxis3; - this.scatterPlot3.YAxis = this.yAxis3; - // - // xAxis3 - // - this.xAxis3.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // scatterGraph2 - // - this.scatterGraph2.Caption = "MOT V1 628"; - this.scatterGraph2.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph2.Location = new System.Drawing.Point(19, 147); - this.scatterGraph2.Name = "scatterGraph2"; - this.scatterGraph2.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot2}); - this.scatterGraph2.Size = new System.Drawing.Size(651, 127); - this.scatterGraph2.TabIndex = 8; - this.scatterGraph2.UseColorGenerator = true; - this.scatterGraph2.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis2}); - this.scatterGraph2.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis2}); - // - // scatterPlot2 - // - this.scatterPlot2.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot2.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot2.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot2.XAxis = this.xAxis2; - this.scatterPlot2.YAxis = this.yAxis2; - // - // xAxis2 - // - this.xAxis2.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // scatterGraph1 - // - this.scatterGraph1.Caption = "MOT 606"; - this.scatterGraph1.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) - | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) - | NationalInstruments.UI.GraphInteractionModes.PanX) - | NationalInstruments.UI.GraphInteractionModes.PanY) - | NationalInstruments.UI.GraphInteractionModes.DragCursor) - | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) - | NationalInstruments.UI.GraphInteractionModes.EditRange))); - this.scatterGraph1.Location = new System.Drawing.Point(19, 14); - this.scatterGraph1.Name = "scatterGraph1"; - this.scatterGraph1.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { - this.scatterPlot1}); - this.scatterGraph1.Size = new System.Drawing.Size(651, 127); - this.scatterGraph1.TabIndex = 0; - this.scatterGraph1.UseColorGenerator = true; - this.scatterGraph1.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { - this.xAxis1}); - this.scatterGraph1.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { - this.yAxis1}); - this.scatterGraph1.PlotDataChanged += new NationalInstruments.UI.XYPlotDataChangedEventHandler(this.scatterGraph1_PlotDataChanged_1); - // - // scatterPlot1 - // - this.scatterPlot1.LineStyle = NationalInstruments.UI.LineStyle.None; - this.scatterPlot1.PointSize = new System.Drawing.Size(2, 2); - this.scatterPlot1.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; - this.scatterPlot1.XAxis = this.xAxis1; - this.scatterPlot1.YAxis = this.yAxis1; - // - // xAxis1 - // - this.xAxis1.Mode = NationalInstruments.UI.AxisMode.Fixed; - // - // stopReadingSidebandsButton - // - this.stopReadingSidebandsButton.Location = new System.Drawing.Point(105, 812); - this.stopReadingSidebandsButton.Name = "stopReadingSidebandsButton"; - this.stopReadingSidebandsButton.Size = new System.Drawing.Size(75, 23); - this.stopReadingSidebandsButton.TabIndex = 7; - this.stopReadingSidebandsButton.Text = "Stop"; - this.stopReadingSidebandsButton.UseVisualStyleBackColor = true; - this.stopReadingSidebandsButton.Click += new System.EventHandler(this.stopReadingButton_Click); - // - // readSidebandsButton - // - this.readSidebandsButton.Location = new System.Drawing.Point(19, 812); - this.readSidebandsButton.Name = "readSidebandsButton"; - this.readSidebandsButton.Size = new System.Drawing.Size(75, 23); - this.readSidebandsButton.TabIndex = 6; - this.readSidebandsButton.Text = "Read"; - this.readSidebandsButton.UseVisualStyleBackColor = true; - this.readSidebandsButton.Click += new System.EventHandler(this.button2_Click); - // - // FlowController - // - this.FlowController.Controls.Add(this.ReturnBox); - this.FlowController.Controls.Add(this.CommandBox); - this.FlowController.Controls.Add(this.SetFlow); - this.FlowController.Controls.Add(this.ReadFlow); - this.FlowController.Location = new System.Drawing.Point(4, 22); - this.FlowController.Name = "FlowController"; - this.FlowController.Padding = new System.Windows.Forms.Padding(3); - this.FlowController.Size = new System.Drawing.Size(680, 855); - this.FlowController.TabIndex = 5; - this.FlowController.Text = " Flow Controller"; - this.FlowController.UseVisualStyleBackColor = true; - // - // ReturnBox - // - this.ReturnBox.Location = new System.Drawing.Point(56, 67); - this.ReturnBox.Name = "ReturnBox"; - this.ReturnBox.Size = new System.Drawing.Size(95, 20); - this.ReturnBox.TabIndex = 3; - // - // CommandBox - // - this.CommandBox.Location = new System.Drawing.Point(201, 67); - this.CommandBox.Name = "CommandBox"; - this.CommandBox.Size = new System.Drawing.Size(95, 20); - this.CommandBox.TabIndex = 2; - // - // SetFlow - // - this.SetFlow.Location = new System.Drawing.Point(205, 19); - this.SetFlow.Name = "SetFlow"; - this.SetFlow.Size = new System.Drawing.Size(64, 28); - this.SetFlow.TabIndex = 1; - this.SetFlow.Text = "Set"; - this.SetFlow.UseVisualStyleBackColor = true; - this.SetFlow.Click += new System.EventHandler(this.SetFlow_Click); - // - // ReadFlow - // - this.ReadFlow.Location = new System.Drawing.Point(73, 19); - this.ReadFlow.Name = "ReadFlow"; - this.ReadFlow.Size = new System.Drawing.Size(64, 28); - this.ReadFlow.TabIndex = 0; - this.ReadFlow.Text = "Read"; - this.ReadFlow.UseVisualStyleBackColor = true; - this.ReadFlow.Click += new System.EventHandler(this.ReadFlow_Click); - // - // MonitoringTab - // - this.MonitoringTab.Controls.Add(this.label12); - this.MonitoringTab.Controls.Add(this.label11); - this.MonitoringTab.Controls.Add(this.label14); - this.MonitoringTab.Controls.Add(this.label13); - this.MonitoringTab.Controls.Add(this.label10); - this.MonitoringTab.Controls.Add(this.label9); - this.MonitoringTab.Controls.Add(this.label6); - this.MonitoringTab.Controls.Add(this.label5); - this.MonitoringTab.Controls.Add(this.label4); - this.MonitoringTab.Controls.Add(this.monitorColdPlate); - this.MonitoringTab.Controls.Add(this.monitorShield); - this.MonitoringTab.Controls.Add(this.monitor10KTherm30KPlate); - this.MonitoringTab.Controls.Add(this.monitorRoughVacuum); - this.MonitoringTab.Controls.Add(this.monitorPressureSourceChamber); - this.MonitoringTab.Controls.Add(this.GetData); - this.MonitoringTab.Controls.Add(this.PressureSourceChamber); - this.MonitoringTab.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; - this.MonitoringTab.Location = new System.Drawing.Point(4, 22); - this.MonitoringTab.Name = "MonitoringTab"; - this.MonitoringTab.Size = new System.Drawing.Size(680, 855); - this.MonitoringTab.TabIndex = 4; - this.MonitoringTab.Text = "Monitor"; - this.MonitoringTab.UseVisualStyleBackColor = true; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); - this.label12.Location = new System.Drawing.Point(297, 150); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(28, 27); - this.label12.TabIndex = 17; - this.label12.Text = "W"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); - this.label11.Location = new System.Drawing.Point(297, 174); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(28, 27); - this.label11.TabIndex = 16; - this.label11.Text = "W"; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(288, 87); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(53, 24); - this.label14.TabIndex = 15; - this.label14.Text = "mbar"; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(288, 58); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(53, 24); - this.label13.TabIndex = 14; - this.label13.Text = "mbar"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); - this.label10.Location = new System.Drawing.Point(297, 123); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(28, 27); - this.label10.TabIndex = 11; - this.label10.Text = "W"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(11, 182); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(55, 16); - this.label9.TabIndex = 10; - this.label9.Text = "4K Cell :"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(11, 158); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(77, 16); - this.label6.TabIndex = 9; - this.label6.Text = "30K Shield :"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(10, 131); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(162, 16); - this.label5.TabIndex = 8; - this.label5.Text = "10K Thermistor 30K Plate :"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(10, 60); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(106, 16); - this.label4.TabIndex = 7; - this.label4.Text = "Rough Vacuum :"; - // - // monitorColdPlate - // - this.monitorColdPlate.Location = new System.Drawing.Point(182, 180); - this.monitorColdPlate.Name = "monitorColdPlate"; - this.monitorColdPlate.Size = new System.Drawing.Size(100, 20); - this.monitorColdPlate.TabIndex = 6; - // - // monitorShield - // - this.monitorShield.Location = new System.Drawing.Point(182, 152); - this.monitorShield.Name = "monitorShield"; - this.monitorShield.Size = new System.Drawing.Size(100, 20); - this.monitorShield.TabIndex = 5; - // - // monitor10KTherm30KPlate - // - this.monitor10KTherm30KPlate.Location = new System.Drawing.Point(182, 125); - this.monitor10KTherm30KPlate.Name = "monitor10KTherm30KPlate"; - this.monitor10KTherm30KPlate.Size = new System.Drawing.Size(100, 20); - this.monitor10KTherm30KPlate.TabIndex = 4; - // - // monitorRoughVacuum - // - this.monitorRoughVacuum.Location = new System.Drawing.Point(182, 58); - this.monitorRoughVacuum.Name = "monitorRoughVacuum"; - this.monitorRoughVacuum.Size = new System.Drawing.Size(100, 20); - this.monitorRoughVacuum.TabIndex = 3; - // - // monitorPressureSourceChamber - // - this.monitorPressureSourceChamber.Location = new System.Drawing.Point(182, 87); - this.monitorPressureSourceChamber.Name = "monitorPressureSourceChamber"; - this.monitorPressureSourceChamber.Size = new System.Drawing.Size(100, 20); - this.monitorPressureSourceChamber.TabIndex = 1; - this.monitorPressureSourceChamber.TextChanged += new System.EventHandler(this.monitorPressureSourceChamber_TextChanged); - // - // GetData - // - this.GetData.Location = new System.Drawing.Point(127, 16); - this.GetData.Name = "GetData"; - this.GetData.Size = new System.Drawing.Size(75, 23); - this.GetData.TabIndex = 2; - this.GetData.Text = "READ"; - this.GetData.UseVisualStyleBackColor = true; - this.GetData.Click += new System.EventHandler(this.GetData_Click); - // - // PressureSourceChamber - // - this.PressureSourceChamber.AutoSize = true; - this.PressureSourceChamber.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.PressureSourceChamber.Location = new System.Drawing.Point(8, 91); - this.PressureSourceChamber.Name = "PressureSourceChamber"; - this.PressureSourceChamber.Size = new System.Drawing.Size(172, 16); - this.PressureSourceChamber.TabIndex = 0; - this.PressureSourceChamber.Text = "Pressure Source Chamber :"; - this.PressureSourceChamber.Click += new System.EventHandler(this.PressureSourceChamber_Click); - // - // FrequencyTab - // - this.FrequencyTab.Controls.Add(this.aom1Box); - this.FrequencyTab.Controls.Add(this.microwaveSynthGroupBox); - this.FrequencyTab.Location = new System.Drawing.Point(4, 22); - this.FrequencyTab.Name = "FrequencyTab"; - this.FrequencyTab.Padding = new System.Windows.Forms.Padding(3); - this.FrequencyTab.Size = new System.Drawing.Size(680, 855); - this.FrequencyTab.TabIndex = 3; - this.FrequencyTab.Text = "Frequencies"; - this.FrequencyTab.UseVisualStyleBackColor = true; - // - // aom1Box - // - this.aom1Box.Controls.Add(this.aom1UpdateButton); - this.aom1Box.Controls.Add(this.label18); - this.aom1Box.Controls.Add(this.aom1AmplitudeBox); - this.aom1Box.Controls.Add(this.label17); - this.aom1Box.Controls.Add(this.label16); - this.aom1Box.Controls.Add(this.aom1FreqBox); - this.aom1Box.Controls.Add(this.label15); - this.aom1Box.Location = new System.Drawing.Point(11, 21); - this.aom1Box.Name = "aom1Box"; - this.aom1Box.Size = new System.Drawing.Size(201, 104); - this.aom1Box.TabIndex = 34; - this.aom1Box.TabStop = false; - this.aom1Box.Text = "MOT AOM"; - // - // aom1UpdateButton - // - this.aom1UpdateButton.Location = new System.Drawing.Point(76, 78); - this.aom1UpdateButton.Name = "aom1UpdateButton"; - this.aom1UpdateButton.Size = new System.Drawing.Size(64, 23); - this.aom1UpdateButton.TabIndex = 33; - this.aom1UpdateButton.Text = "Update"; - this.aom1UpdateButton.UseVisualStyleBackColor = true; - this.aom1UpdateButton.Click += new System.EventHandler(this.aom1UpdateButton_Click); - // - // label18 - // - this.label18.Location = new System.Drawing.Point(146, 52); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(44, 23); - this.label18.TabIndex = 34; - this.label18.Text = "dBm"; - // - // aom1AmplitudeBox - // - this.aom1AmplitudeBox.Location = new System.Drawing.Point(76, 49); - this.aom1AmplitudeBox.Name = "aom1AmplitudeBox"; - this.aom1AmplitudeBox.Size = new System.Drawing.Size(64, 20); - this.aom1AmplitudeBox.TabIndex = 33; - this.aom1AmplitudeBox.Text = "0"; - // - // label17 - // - this.label17.Location = new System.Drawing.Point(6, 52); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(64, 23); - this.label17.TabIndex = 33; - this.label17.Text = "Amplitude"; - // - // label16 - // - this.label16.Location = new System.Drawing.Point(146, 23); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(48, 23); - this.label16.TabIndex = 33; - this.label16.Text = "MHz"; - // - // aom1FreqBox - // - this.aom1FreqBox.Location = new System.Drawing.Point(76, 23); - this.aom1FreqBox.Name = "aom1FreqBox"; - this.aom1FreqBox.Size = new System.Drawing.Size(64, 20); - this.aom1FreqBox.TabIndex = 29; - this.aom1FreqBox.Text = "100"; - // - // label15 - // - this.label15.Location = new System.Drawing.Point(6, 23); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(64, 23); - this.label15.TabIndex = 28; - this.label15.Text = "Frequency"; - // - // microwaveSynthGroupBox - // - this.microwaveSynthGroupBox.Controls.Add(this.label8); - this.microwaveSynthGroupBox.Controls.Add(this.synthSettingsUpdateButton); - this.microwaveSynthGroupBox.Controls.Add(this.synthOnFreqBox); - this.microwaveSynthGroupBox.Controls.Add(this.synthOnCheck); - this.microwaveSynthGroupBox.Controls.Add(this.label2); - this.microwaveSynthGroupBox.Controls.Add(this.label7); - this.microwaveSynthGroupBox.Controls.Add(this.label1); - this.microwaveSynthGroupBox.Controls.Add(this.synthOnAmpBox); - this.microwaveSynthGroupBox.Location = new System.Drawing.Point(11, 148); - this.microwaveSynthGroupBox.Name = "microwaveSynthGroupBox"; - this.microwaveSynthGroupBox.Size = new System.Drawing.Size(201, 107); - this.microwaveSynthGroupBox.TabIndex = 33; - this.microwaveSynthGroupBox.TabStop = false; - this.microwaveSynthGroupBox.Text = "Microwave synthesizer"; - // - // label8 - // - this.label8.Location = new System.Drawing.Point(6, 16); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(64, 23); - this.label8.TabIndex = 27; - this.label8.Text = "Frequency"; - // - // synthSettingsUpdateButton - // - this.synthSettingsUpdateButton.Location = new System.Drawing.Point(74, 68); - this.synthSettingsUpdateButton.Name = "synthSettingsUpdateButton"; - this.synthSettingsUpdateButton.Size = new System.Drawing.Size(66, 23); - this.synthSettingsUpdateButton.TabIndex = 32; - this.synthSettingsUpdateButton.Text = "Update"; - this.synthSettingsUpdateButton.UseVisualStyleBackColor = true; - this.synthSettingsUpdateButton.Click += new System.EventHandler(this.synthSettingsUpdateButton_Click); - // - // synthOnFreqBox - // - this.synthOnFreqBox.Location = new System.Drawing.Point(74, 16); - this.synthOnFreqBox.Name = "synthOnFreqBox"; - this.synthOnFreqBox.Size = new System.Drawing.Size(64, 20); - this.synthOnFreqBox.TabIndex = 24; - this.synthOnFreqBox.Text = "14"; - // - // synthOnCheck - // - this.synthOnCheck.Location = new System.Drawing.Point(6, 65); - this.synthOnCheck.Name = "synthOnCheck"; - this.synthOnCheck.Size = new System.Drawing.Size(104, 24); - this.synthOnCheck.TabIndex = 29; - this.synthOnCheck.Text = "On/Off"; - this.synthOnCheck.CheckedChanged += new System.EventHandler(this.synthOnCheck_CheckedChanged); - // - // label2 - // - this.label2.Location = new System.Drawing.Point(142, 42); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(44, 23); - this.label2.TabIndex = 31; - this.label2.Text = "dBm"; - // - // label7 - // - this.label7.Location = new System.Drawing.Point(6, 39); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(64, 23); - this.label7.TabIndex = 28; - this.label7.Text = "Amplitude"; - // - // label1 - // - this.label1.Location = new System.Drawing.Point(142, 19); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(48, 23); - this.label1.TabIndex = 30; - this.label1.Text = "GHz"; - // - // synthOnAmpBox - // - this.synthOnAmpBox.Location = new System.Drawing.Point(74, 39); - this.synthOnAmpBox.Name = "synthOnAmpBox"; - this.synthOnAmpBox.Size = new System.Drawing.Size(64, 20); - this.synthOnAmpBox.TabIndex = 25; - this.synthOnAmpBox.Text = "-6"; - // - // tabControl - // - this.tabControl.Controls.Add(this.FrequencyTab); - this.tabControl.Controls.Add(this.MonitoringTab); - this.tabControl.Controls.Add(this.FlowController); - this.tabControl.Controls.Add(this.sideBandTab); - this.tabControl.Location = new System.Drawing.Point(1, 3); - this.tabControl.Multiline = true; - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(688, 881); - this.tabControl.TabIndex = 0; - // - // ControlWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(695, 896); - this.Controls.Add(this.tabControl); - this.MaximizeBox = false; - this.Name = "ControlWindow"; - this.Text = "Decelerator Control"; - this.sideBandTab.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph6)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph5)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).EndInit(); - this.FlowController.ResumeLayout(false); - this.FlowController.PerformLayout(); - this.MonitoringTab.ResumeLayout(false); - this.MonitoringTab.PerformLayout(); - this.FrequencyTab.ResumeLayout(false); - this.aom1Box.ResumeLayout(false); - this.aom1Box.PerformLayout(); - this.microwaveSynthGroupBox.ResumeLayout(false); - this.microwaveSynthGroupBox.PerformLayout(); - this.tabControl.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.PrintDialog printDialog1; - private System.Windows.Forms.TabPage sideBandTab; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph6; - private NationalInstruments.UI.ScatterPlot scatterPlot6; - private NationalInstruments.UI.XAxis xAxis6; - private NationalInstruments.UI.YAxis yAxis6; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph5; - private NationalInstruments.UI.ScatterPlot scatterPlot5; - private NationalInstruments.UI.XAxis xAxis5; - private NationalInstruments.UI.YAxis yAxis5; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph4; - private NationalInstruments.UI.ScatterPlot scatterPlot4; - private NationalInstruments.UI.XAxis xAxis4; - private NationalInstruments.UI.YAxis yAxis4; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph3; - private NationalInstruments.UI.ScatterPlot scatterPlot3; - private NationalInstruments.UI.XAxis xAxis3; - private NationalInstruments.UI.YAxis yAxis3; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph2; - private NationalInstruments.UI.ScatterPlot scatterPlot2; - private NationalInstruments.UI.XAxis xAxis2; - private NationalInstruments.UI.YAxis yAxis2; - public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph1; - private NationalInstruments.UI.ScatterPlot scatterPlot1; - private NationalInstruments.UI.XAxis xAxis1; - private NationalInstruments.UI.YAxis yAxis1; - private System.Windows.Forms.Button stopReadingSidebandsButton; - private System.Windows.Forms.Button readSidebandsButton; - private System.Windows.Forms.TabPage FlowController; - public System.Windows.Forms.TextBox ReturnBox; - public System.Windows.Forms.TextBox CommandBox; - private System.Windows.Forms.Button SetFlow; - private System.Windows.Forms.Button ReadFlow; - private System.Windows.Forms.TabPage MonitoringTab; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - public System.Windows.Forms.TextBox monitorColdPlate; - public System.Windows.Forms.TextBox monitorShield; - public System.Windows.Forms.TextBox monitor10KTherm30KPlate; - public System.Windows.Forms.TextBox monitorRoughVacuum; - public System.Windows.Forms.TextBox monitorPressureSourceChamber; - private System.Windows.Forms.Button GetData; - private System.Windows.Forms.Label PressureSourceChamber; - private System.Windows.Forms.TabPage FrequencyTab; - public System.Windows.Forms.Button synthSettingsUpdateButton; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - public System.Windows.Forms.CheckBox synthOnCheck; - private System.Windows.Forms.Label label7; - public System.Windows.Forms.TextBox synthOnAmpBox; - public System.Windows.Forms.TextBox synthOnFreqBox; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TabControl tabControl; - private System.Windows.Forms.GroupBox aom1Box; - public System.Windows.Forms.TextBox aom1FreqBox; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.GroupBox microwaveSynthGroupBox; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label18; - public System.Windows.Forms.TextBox aom1AmplitudeBox; - private System.Windows.Forms.Label label17; - public System.Windows.Forms.Button aom1UpdateButton; - - } -} - +namespace DecelerationHardwareControl +{ + partial class ControlWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label3 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.printDialog1 = new System.Windows.Forms.PrintDialog(); + this.sideBandTab = new System.Windows.Forms.TabPage(); + this.scatterGraph6 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot6 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis6 = new NationalInstruments.UI.XAxis(); + this.yAxis6 = new NationalInstruments.UI.YAxis(); + this.scatterGraph5 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot5 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis5 = new NationalInstruments.UI.XAxis(); + this.yAxis5 = new NationalInstruments.UI.YAxis(); + this.scatterGraph4 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot4 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis4 = new NationalInstruments.UI.XAxis(); + this.yAxis4 = new NationalInstruments.UI.YAxis(); + this.scatterGraph3 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot3 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis3 = new NationalInstruments.UI.XAxis(); + this.yAxis3 = new NationalInstruments.UI.YAxis(); + this.scatterGraph2 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot2 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis2 = new NationalInstruments.UI.XAxis(); + this.yAxis2 = new NationalInstruments.UI.YAxis(); + this.scatterGraph1 = new NationalInstruments.UI.WindowsForms.ScatterGraph(); + this.scatterPlot1 = new NationalInstruments.UI.ScatterPlot(); + this.xAxis1 = new NationalInstruments.UI.XAxis(); + this.yAxis1 = new NationalInstruments.UI.YAxis(); + this.stopReadingSidebandsButton = new System.Windows.Forms.Button(); + this.readSidebandsButton = new System.Windows.Forms.Button(); + this.FlowController = new System.Windows.Forms.TabPage(); + this.ReturnBox = new System.Windows.Forms.TextBox(); + this.CommandBox = new System.Windows.Forms.TextBox(); + this.SetFlow = new System.Windows.Forms.Button(); + this.ReadFlow = new System.Windows.Forms.Button(); + this.MonitoringTab = new System.Windows.Forms.TabPage(); + this.label12 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.monitorColdPlate = new System.Windows.Forms.TextBox(); + this.monitorShield = new System.Windows.Forms.TextBox(); + this.monitor10KTherm30KPlate = new System.Windows.Forms.TextBox(); + this.monitorRoughVacuum = new System.Windows.Forms.TextBox(); + this.monitorPressureSourceChamber = new System.Windows.Forms.TextBox(); + this.GetData = new System.Windows.Forms.Button(); + this.PressureSourceChamber = new System.Windows.Forms.Label(); + this.FrequencyTab = new System.Windows.Forms.TabPage(); + this.aom1Box = new System.Windows.Forms.GroupBox(); + this.aom1UpdateButton = new System.Windows.Forms.Button(); + this.label18 = new System.Windows.Forms.Label(); + this.aom1AmplitudeBox = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.aom1FreqBox = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.microwaveSynthGroupBox = new System.Windows.Forms.GroupBox(); + this.label8 = new System.Windows.Forms.Label(); + this.synthSettingsUpdateButton = new System.Windows.Forms.Button(); + this.synthOnFreqBox = new System.Windows.Forms.TextBox(); + this.synthOnCheck = new System.Windows.Forms.CheckBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.synthOnAmpBox = new System.Windows.Forms.TextBox(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.sideBandTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).BeginInit(); + this.FlowController.SuspendLayout(); + this.MonitoringTab.SuspendLayout(); + this.FrequencyTab.SuspendLayout(); + this.aom1Box.SuspendLayout(); + this.microwaveSynthGroupBox.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // label3 + // + this.label3.Location = new System.Drawing.Point(0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(100, 23); + this.label3.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(0, 0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + // + // printDialog1 + // + this.printDialog1.UseEXDialog = true; + // + // sideBandTab + // + this.sideBandTab.Controls.Add(this.scatterGraph6); + this.sideBandTab.Controls.Add(this.scatterGraph5); + this.sideBandTab.Controls.Add(this.scatterGraph4); + this.sideBandTab.Controls.Add(this.scatterGraph3); + this.sideBandTab.Controls.Add(this.scatterGraph2); + this.sideBandTab.Controls.Add(this.scatterGraph1); + this.sideBandTab.Controls.Add(this.stopReadingSidebandsButton); + this.sideBandTab.Controls.Add(this.readSidebandsButton); + this.sideBandTab.Location = new System.Drawing.Point(4, 22); + this.sideBandTab.Name = "sideBandTab"; + this.sideBandTab.Padding = new System.Windows.Forms.Padding(3); + this.sideBandTab.Size = new System.Drawing.Size(680, 855); + this.sideBandTab.TabIndex = 6; + this.sideBandTab.Text = "Sidebands"; + this.sideBandTab.UseVisualStyleBackColor = true; + this.sideBandTab.Click += new System.EventHandler(this.sideBandTab_Click); + // + // scatterGraph6 + // + this.scatterGraph6.Caption = "Slowing V1 628"; + this.scatterGraph6.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph6.Location = new System.Drawing.Point(19, 679); + this.scatterGraph6.Name = "scatterGraph6"; + this.scatterGraph6.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot6}); + this.scatterGraph6.Size = new System.Drawing.Size(651, 127); + this.scatterGraph6.TabIndex = 12; + this.scatterGraph6.UseColorGenerator = true; + this.scatterGraph6.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis6}); + this.scatterGraph6.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis6}); + // + // scatterPlot6 + // + this.scatterPlot6.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot6.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot6.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot6.XAxis = this.xAxis6; + this.scatterPlot6.YAxis = this.yAxis6; + // + // xAxis6 + // + this.xAxis6.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // scatterGraph5 + // + this.scatterGraph5.Caption = "Slowing 531"; + this.scatterGraph5.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph5.Location = new System.Drawing.Point(19, 546); + this.scatterGraph5.Name = "scatterGraph5"; + this.scatterGraph5.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot5}); + this.scatterGraph5.Size = new System.Drawing.Size(651, 127); + this.scatterGraph5.TabIndex = 11; + this.scatterGraph5.UseColorGenerator = true; + this.scatterGraph5.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis5}); + this.scatterGraph5.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis5}); + // + // scatterPlot5 + // + this.scatterPlot5.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot5.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot5.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot5.XAxis = this.xAxis5; + this.scatterPlot5.YAxis = this.yAxis5; + // + // xAxis5 + // + this.xAxis5.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // scatterGraph4 + // + this.scatterGraph4.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph4.Location = new System.Drawing.Point(19, 413); + this.scatterGraph4.Name = "scatterGraph4"; + this.scatterGraph4.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot4}); + this.scatterGraph4.Size = new System.Drawing.Size(651, 127); + this.scatterGraph4.TabIndex = 10; + this.scatterGraph4.UseColorGenerator = true; + this.scatterGraph4.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis4}); + this.scatterGraph4.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis4}); + // + // scatterPlot4 + // + this.scatterPlot4.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot4.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot4.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot4.XAxis = this.xAxis4; + this.scatterPlot4.YAxis = this.yAxis4; + // + // xAxis4 + // + this.xAxis4.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // scatterGraph3 + // + this.scatterGraph3.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph3.Location = new System.Drawing.Point(19, 280); + this.scatterGraph3.Name = "scatterGraph3"; + this.scatterGraph3.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot3}); + this.scatterGraph3.Size = new System.Drawing.Size(651, 127); + this.scatterGraph3.TabIndex = 9; + this.scatterGraph3.UseColorGenerator = true; + this.scatterGraph3.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis3}); + this.scatterGraph3.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis3}); + // + // scatterPlot3 + // + this.scatterPlot3.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot3.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot3.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot3.XAxis = this.xAxis3; + this.scatterPlot3.YAxis = this.yAxis3; + // + // xAxis3 + // + this.xAxis3.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // scatterGraph2 + // + this.scatterGraph2.Caption = "MOT V1 628"; + this.scatterGraph2.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph2.Location = new System.Drawing.Point(19, 147); + this.scatterGraph2.Name = "scatterGraph2"; + this.scatterGraph2.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot2}); + this.scatterGraph2.Size = new System.Drawing.Size(651, 127); + this.scatterGraph2.TabIndex = 8; + this.scatterGraph2.UseColorGenerator = true; + this.scatterGraph2.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis2}); + this.scatterGraph2.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis2}); + // + // scatterPlot2 + // + this.scatterPlot2.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot2.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot2.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot2.XAxis = this.xAxis2; + this.scatterPlot2.YAxis = this.yAxis2; + // + // xAxis2 + // + this.xAxis2.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // scatterGraph1 + // + this.scatterGraph1.Caption = "MOT 606"; + this.scatterGraph1.InteractionMode = ((NationalInstruments.UI.GraphInteractionModes)((((((((NationalInstruments.UI.GraphInteractionModes.ZoomX | NationalInstruments.UI.GraphInteractionModes.ZoomY) + | NationalInstruments.UI.GraphInteractionModes.ZoomAroundPoint) + | NationalInstruments.UI.GraphInteractionModes.PanX) + | NationalInstruments.UI.GraphInteractionModes.PanY) + | NationalInstruments.UI.GraphInteractionModes.DragCursor) + | NationalInstruments.UI.GraphInteractionModes.DragAnnotationCaption) + | NationalInstruments.UI.GraphInteractionModes.EditRange))); + this.scatterGraph1.Location = new System.Drawing.Point(19, 14); + this.scatterGraph1.Name = "scatterGraph1"; + this.scatterGraph1.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] { + this.scatterPlot1}); + this.scatterGraph1.Size = new System.Drawing.Size(651, 127); + this.scatterGraph1.TabIndex = 0; + this.scatterGraph1.UseColorGenerator = true; + this.scatterGraph1.XAxes.AddRange(new NationalInstruments.UI.XAxis[] { + this.xAxis1}); + this.scatterGraph1.YAxes.AddRange(new NationalInstruments.UI.YAxis[] { + this.yAxis1}); + this.scatterGraph1.PlotDataChanged += new NationalInstruments.UI.XYPlotDataChangedEventHandler(this.scatterGraph1_PlotDataChanged_1); + // + // scatterPlot1 + // + this.scatterPlot1.LineStyle = NationalInstruments.UI.LineStyle.None; + this.scatterPlot1.PointSize = new System.Drawing.Size(2, 2); + this.scatterPlot1.PointStyle = NationalInstruments.UI.PointStyle.SolidCircle; + this.scatterPlot1.XAxis = this.xAxis1; + this.scatterPlot1.YAxis = this.yAxis1; + // + // xAxis1 + // + this.xAxis1.Mode = NationalInstruments.UI.AxisMode.Fixed; + // + // stopReadingSidebandsButton + // + this.stopReadingSidebandsButton.Location = new System.Drawing.Point(105, 812); + this.stopReadingSidebandsButton.Name = "stopReadingSidebandsButton"; + this.stopReadingSidebandsButton.Size = new System.Drawing.Size(75, 23); + this.stopReadingSidebandsButton.TabIndex = 7; + this.stopReadingSidebandsButton.Text = "Stop"; + this.stopReadingSidebandsButton.UseVisualStyleBackColor = true; + this.stopReadingSidebandsButton.Click += new System.EventHandler(this.stopReadingButton_Click); + // + // readSidebandsButton + // + this.readSidebandsButton.Location = new System.Drawing.Point(19, 812); + this.readSidebandsButton.Name = "readSidebandsButton"; + this.readSidebandsButton.Size = new System.Drawing.Size(75, 23); + this.readSidebandsButton.TabIndex = 6; + this.readSidebandsButton.Text = "Read"; + this.readSidebandsButton.UseVisualStyleBackColor = true; + this.readSidebandsButton.Click += new System.EventHandler(this.button2_Click); + // + // FlowController + // + this.FlowController.Controls.Add(this.ReturnBox); + this.FlowController.Controls.Add(this.CommandBox); + this.FlowController.Controls.Add(this.SetFlow); + this.FlowController.Controls.Add(this.ReadFlow); + this.FlowController.Location = new System.Drawing.Point(4, 22); + this.FlowController.Name = "FlowController"; + this.FlowController.Padding = new System.Windows.Forms.Padding(3); + this.FlowController.Size = new System.Drawing.Size(680, 855); + this.FlowController.TabIndex = 5; + this.FlowController.Text = " Flow Controller"; + this.FlowController.UseVisualStyleBackColor = true; + // + // ReturnBox + // + this.ReturnBox.Location = new System.Drawing.Point(56, 67); + this.ReturnBox.Name = "ReturnBox"; + this.ReturnBox.Size = new System.Drawing.Size(95, 20); + this.ReturnBox.TabIndex = 3; + // + // CommandBox + // + this.CommandBox.Location = new System.Drawing.Point(201, 67); + this.CommandBox.Name = "CommandBox"; + this.CommandBox.Size = new System.Drawing.Size(95, 20); + this.CommandBox.TabIndex = 2; + // + // SetFlow + // + this.SetFlow.Location = new System.Drawing.Point(205, 19); + this.SetFlow.Name = "SetFlow"; + this.SetFlow.Size = new System.Drawing.Size(64, 28); + this.SetFlow.TabIndex = 1; + this.SetFlow.Text = "Set"; + this.SetFlow.UseVisualStyleBackColor = true; + this.SetFlow.Click += new System.EventHandler(this.SetFlow_Click); + // + // ReadFlow + // + this.ReadFlow.Location = new System.Drawing.Point(73, 19); + this.ReadFlow.Name = "ReadFlow"; + this.ReadFlow.Size = new System.Drawing.Size(64, 28); + this.ReadFlow.TabIndex = 0; + this.ReadFlow.Text = "Read"; + this.ReadFlow.UseVisualStyleBackColor = true; + this.ReadFlow.Click += new System.EventHandler(this.ReadFlow_Click); + // + // MonitoringTab + // + this.MonitoringTab.Controls.Add(this.label12); + this.MonitoringTab.Controls.Add(this.label11); + this.MonitoringTab.Controls.Add(this.label14); + this.MonitoringTab.Controls.Add(this.label13); + this.MonitoringTab.Controls.Add(this.label10); + this.MonitoringTab.Controls.Add(this.label9); + this.MonitoringTab.Controls.Add(this.label6); + this.MonitoringTab.Controls.Add(this.label5); + this.MonitoringTab.Controls.Add(this.label4); + this.MonitoringTab.Controls.Add(this.monitorColdPlate); + this.MonitoringTab.Controls.Add(this.monitorShield); + this.MonitoringTab.Controls.Add(this.monitor10KTherm30KPlate); + this.MonitoringTab.Controls.Add(this.monitorRoughVacuum); + this.MonitoringTab.Controls.Add(this.monitorPressureSourceChamber); + this.MonitoringTab.Controls.Add(this.GetData); + this.MonitoringTab.Controls.Add(this.PressureSourceChamber); + this.MonitoringTab.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; + this.MonitoringTab.Location = new System.Drawing.Point(4, 22); + this.MonitoringTab.Name = "MonitoringTab"; + this.MonitoringTab.Size = new System.Drawing.Size(680, 855); + this.MonitoringTab.TabIndex = 4; + this.MonitoringTab.Text = "Monitor"; + this.MonitoringTab.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); + this.label12.Location = new System.Drawing.Point(297, 150); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(28, 27); + this.label12.TabIndex = 17; + this.label12.Text = "W"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); + this.label11.Location = new System.Drawing.Point(297, 174); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(28, 27); + this.label11.TabIndex = 16; + this.label11.Text = "W"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label14.Location = new System.Drawing.Point(288, 87); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(53, 24); + this.label14.TabIndex = 15; + this.label14.Text = "mbar"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.Location = new System.Drawing.Point(288, 58); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(53, 24); + this.label13.TabIndex = 14; + this.label13.Text = "mbar"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Symbol", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); + this.label10.Location = new System.Drawing.Point(297, 123); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(28, 27); + this.label10.TabIndex = 11; + this.label10.Text = "W"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(11, 182); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(55, 16); + this.label9.TabIndex = 10; + this.label9.Text = "4K Cell :"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(11, 158); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(77, 16); + this.label6.TabIndex = 9; + this.label6.Text = "30K Shield :"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(10, 131); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(162, 16); + this.label5.TabIndex = 8; + this.label5.Text = "10K Thermistor 30K Plate :"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(10, 60); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(106, 16); + this.label4.TabIndex = 7; + this.label4.Text = "Rough Vacuum :"; + // + // monitorColdPlate + // + this.monitorColdPlate.Location = new System.Drawing.Point(182, 180); + this.monitorColdPlate.Name = "monitorColdPlate"; + this.monitorColdPlate.Size = new System.Drawing.Size(100, 20); + this.monitorColdPlate.TabIndex = 6; + // + // monitorShield + // + this.monitorShield.Location = new System.Drawing.Point(182, 152); + this.monitorShield.Name = "monitorShield"; + this.monitorShield.Size = new System.Drawing.Size(100, 20); + this.monitorShield.TabIndex = 5; + // + // monitor10KTherm30KPlate + // + this.monitor10KTherm30KPlate.Location = new System.Drawing.Point(182, 125); + this.monitor10KTherm30KPlate.Name = "monitor10KTherm30KPlate"; + this.monitor10KTherm30KPlate.Size = new System.Drawing.Size(100, 20); + this.monitor10KTherm30KPlate.TabIndex = 4; + // + // monitorRoughVacuum + // + this.monitorRoughVacuum.Location = new System.Drawing.Point(182, 58); + this.monitorRoughVacuum.Name = "monitorRoughVacuum"; + this.monitorRoughVacuum.Size = new System.Drawing.Size(100, 20); + this.monitorRoughVacuum.TabIndex = 3; + // + // monitorPressureSourceChamber + // + this.monitorPressureSourceChamber.Location = new System.Drawing.Point(182, 87); + this.monitorPressureSourceChamber.Name = "monitorPressureSourceChamber"; + this.monitorPressureSourceChamber.Size = new System.Drawing.Size(100, 20); + this.monitorPressureSourceChamber.TabIndex = 1; + this.monitorPressureSourceChamber.TextChanged += new System.EventHandler(this.monitorPressureSourceChamber_TextChanged); + // + // GetData + // + this.GetData.Location = new System.Drawing.Point(127, 16); + this.GetData.Name = "GetData"; + this.GetData.Size = new System.Drawing.Size(75, 23); + this.GetData.TabIndex = 2; + this.GetData.Text = "READ"; + this.GetData.UseVisualStyleBackColor = true; + this.GetData.Click += new System.EventHandler(this.GetData_Click); + // + // PressureSourceChamber + // + this.PressureSourceChamber.AutoSize = true; + this.PressureSourceChamber.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.PressureSourceChamber.Location = new System.Drawing.Point(8, 91); + this.PressureSourceChamber.Name = "PressureSourceChamber"; + this.PressureSourceChamber.Size = new System.Drawing.Size(172, 16); + this.PressureSourceChamber.TabIndex = 0; + this.PressureSourceChamber.Text = "Pressure Source Chamber :"; + this.PressureSourceChamber.Click += new System.EventHandler(this.PressureSourceChamber_Click); + // + // FrequencyTab + // + this.FrequencyTab.Controls.Add(this.aom1Box); + this.FrequencyTab.Controls.Add(this.microwaveSynthGroupBox); + this.FrequencyTab.Location = new System.Drawing.Point(4, 22); + this.FrequencyTab.Name = "FrequencyTab"; + this.FrequencyTab.Padding = new System.Windows.Forms.Padding(3); + this.FrequencyTab.Size = new System.Drawing.Size(680, 855); + this.FrequencyTab.TabIndex = 3; + this.FrequencyTab.Text = "Frequencies"; + this.FrequencyTab.UseVisualStyleBackColor = true; + // + // aom1Box + // + this.aom1Box.Controls.Add(this.aom1UpdateButton); + this.aom1Box.Controls.Add(this.label18); + this.aom1Box.Controls.Add(this.aom1AmplitudeBox); + this.aom1Box.Controls.Add(this.label17); + this.aom1Box.Controls.Add(this.label16); + this.aom1Box.Controls.Add(this.aom1FreqBox); + this.aom1Box.Controls.Add(this.label15); + this.aom1Box.Location = new System.Drawing.Point(11, 21); + this.aom1Box.Name = "aom1Box"; + this.aom1Box.Size = new System.Drawing.Size(201, 104); + this.aom1Box.TabIndex = 34; + this.aom1Box.TabStop = false; + this.aom1Box.Text = "MOT AOM"; + // + // aom1UpdateButton + // + this.aom1UpdateButton.Location = new System.Drawing.Point(76, 78); + this.aom1UpdateButton.Name = "aom1UpdateButton"; + this.aom1UpdateButton.Size = new System.Drawing.Size(64, 23); + this.aom1UpdateButton.TabIndex = 33; + this.aom1UpdateButton.Text = "Update"; + this.aom1UpdateButton.UseVisualStyleBackColor = true; + this.aom1UpdateButton.Click += new System.EventHandler(this.aom1UpdateButton_Click); + // + // label18 + // + this.label18.Location = new System.Drawing.Point(146, 52); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(44, 23); + this.label18.TabIndex = 34; + this.label18.Text = "dBm"; + // + // aom1AmplitudeBox + // + this.aom1AmplitudeBox.Location = new System.Drawing.Point(76, 49); + this.aom1AmplitudeBox.Name = "aom1AmplitudeBox"; + this.aom1AmplitudeBox.Size = new System.Drawing.Size(64, 20); + this.aom1AmplitudeBox.TabIndex = 33; + this.aom1AmplitudeBox.Text = "0"; + // + // label17 + // + this.label17.Location = new System.Drawing.Point(6, 52); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(64, 23); + this.label17.TabIndex = 33; + this.label17.Text = "Amplitude"; + // + // label16 + // + this.label16.Location = new System.Drawing.Point(146, 23); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(48, 23); + this.label16.TabIndex = 33; + this.label16.Text = "MHz"; + // + // aom1FreqBox + // + this.aom1FreqBox.Location = new System.Drawing.Point(76, 23); + this.aom1FreqBox.Name = "aom1FreqBox"; + this.aom1FreqBox.Size = new System.Drawing.Size(64, 20); + this.aom1FreqBox.TabIndex = 29; + this.aom1FreqBox.Text = "100"; + // + // label15 + // + this.label15.Location = new System.Drawing.Point(6, 23); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(64, 23); + this.label15.TabIndex = 28; + this.label15.Text = "Frequency"; + // + // microwaveSynthGroupBox + // + this.microwaveSynthGroupBox.Controls.Add(this.label8); + this.microwaveSynthGroupBox.Controls.Add(this.synthSettingsUpdateButton); + this.microwaveSynthGroupBox.Controls.Add(this.synthOnFreqBox); + this.microwaveSynthGroupBox.Controls.Add(this.synthOnCheck); + this.microwaveSynthGroupBox.Controls.Add(this.label2); + this.microwaveSynthGroupBox.Controls.Add(this.label7); + this.microwaveSynthGroupBox.Controls.Add(this.label1); + this.microwaveSynthGroupBox.Controls.Add(this.synthOnAmpBox); + this.microwaveSynthGroupBox.Location = new System.Drawing.Point(11, 148); + this.microwaveSynthGroupBox.Name = "microwaveSynthGroupBox"; + this.microwaveSynthGroupBox.Size = new System.Drawing.Size(201, 107); + this.microwaveSynthGroupBox.TabIndex = 33; + this.microwaveSynthGroupBox.TabStop = false; + this.microwaveSynthGroupBox.Text = "Microwave synthesizer"; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(6, 16); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(64, 23); + this.label8.TabIndex = 27; + this.label8.Text = "Frequency"; + // + // synthSettingsUpdateButton + // + this.synthSettingsUpdateButton.Location = new System.Drawing.Point(74, 68); + this.synthSettingsUpdateButton.Name = "synthSettingsUpdateButton"; + this.synthSettingsUpdateButton.Size = new System.Drawing.Size(66, 23); + this.synthSettingsUpdateButton.TabIndex = 32; + this.synthSettingsUpdateButton.Text = "Update"; + this.synthSettingsUpdateButton.UseVisualStyleBackColor = true; + this.synthSettingsUpdateButton.Click += new System.EventHandler(this.synthSettingsUpdateButton_Click); + // + // synthOnFreqBox + // + this.synthOnFreqBox.Location = new System.Drawing.Point(74, 16); + this.synthOnFreqBox.Name = "synthOnFreqBox"; + this.synthOnFreqBox.Size = new System.Drawing.Size(64, 20); + this.synthOnFreqBox.TabIndex = 24; + this.synthOnFreqBox.Text = "14"; + // + // synthOnCheck + // + this.synthOnCheck.Location = new System.Drawing.Point(6, 65); + this.synthOnCheck.Name = "synthOnCheck"; + this.synthOnCheck.Size = new System.Drawing.Size(104, 24); + this.synthOnCheck.TabIndex = 29; + this.synthOnCheck.Text = "On/Off"; + this.synthOnCheck.CheckedChanged += new System.EventHandler(this.synthOnCheck_CheckedChanged); + // + // label2 + // + this.label2.Location = new System.Drawing.Point(142, 42); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 23); + this.label2.TabIndex = 31; + this.label2.Text = "dBm"; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(6, 39); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(64, 23); + this.label7.TabIndex = 28; + this.label7.Text = "Amplitude"; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(142, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(48, 23); + this.label1.TabIndex = 30; + this.label1.Text = "GHz"; + // + // synthOnAmpBox + // + this.synthOnAmpBox.Location = new System.Drawing.Point(74, 39); + this.synthOnAmpBox.Name = "synthOnAmpBox"; + this.synthOnAmpBox.Size = new System.Drawing.Size(64, 20); + this.synthOnAmpBox.TabIndex = 25; + this.synthOnAmpBox.Text = "-6"; + // + // tabControl + // + this.tabControl.Controls.Add(this.FrequencyTab); + this.tabControl.Controls.Add(this.MonitoringTab); + this.tabControl.Controls.Add(this.FlowController); + this.tabControl.Controls.Add(this.sideBandTab); + this.tabControl.Location = new System.Drawing.Point(1, 3); + this.tabControl.Multiline = true; + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(688, 881); + this.tabControl.TabIndex = 0; + // + // ControlWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(695, 896); + this.Controls.Add(this.tabControl); + this.MaximizeBox = false; + this.Name = "ControlWindow"; + this.Text = "Decelerator Control"; + this.sideBandTab.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).EndInit(); + this.FlowController.ResumeLayout(false); + this.FlowController.PerformLayout(); + this.MonitoringTab.ResumeLayout(false); + this.MonitoringTab.PerformLayout(); + this.FrequencyTab.ResumeLayout(false); + this.aom1Box.ResumeLayout(false); + this.aom1Box.PerformLayout(); + this.microwaveSynthGroupBox.ResumeLayout(false); + this.microwaveSynthGroupBox.PerformLayout(); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.PrintDialog printDialog1; + private System.Windows.Forms.TabPage sideBandTab; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph6; + private NationalInstruments.UI.ScatterPlot scatterPlot6; + private NationalInstruments.UI.XAxis xAxis6; + private NationalInstruments.UI.YAxis yAxis6; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph5; + private NationalInstruments.UI.ScatterPlot scatterPlot5; + private NationalInstruments.UI.XAxis xAxis5; + private NationalInstruments.UI.YAxis yAxis5; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph4; + private NationalInstruments.UI.ScatterPlot scatterPlot4; + private NationalInstruments.UI.XAxis xAxis4; + private NationalInstruments.UI.YAxis yAxis4; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph3; + private NationalInstruments.UI.ScatterPlot scatterPlot3; + private NationalInstruments.UI.XAxis xAxis3; + private NationalInstruments.UI.YAxis yAxis3; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph2; + private NationalInstruments.UI.ScatterPlot scatterPlot2; + private NationalInstruments.UI.XAxis xAxis2; + private NationalInstruments.UI.YAxis yAxis2; + public NationalInstruments.UI.WindowsForms.ScatterGraph scatterGraph1; + private NationalInstruments.UI.ScatterPlot scatterPlot1; + private NationalInstruments.UI.XAxis xAxis1; + private NationalInstruments.UI.YAxis yAxis1; + private System.Windows.Forms.Button stopReadingSidebandsButton; + private System.Windows.Forms.Button readSidebandsButton; + private System.Windows.Forms.TabPage FlowController; + public System.Windows.Forms.TextBox ReturnBox; + public System.Windows.Forms.TextBox CommandBox; + private System.Windows.Forms.Button SetFlow; + private System.Windows.Forms.Button ReadFlow; + private System.Windows.Forms.TabPage MonitoringTab; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + public System.Windows.Forms.TextBox monitorColdPlate; + public System.Windows.Forms.TextBox monitorShield; + public System.Windows.Forms.TextBox monitor10KTherm30KPlate; + public System.Windows.Forms.TextBox monitorRoughVacuum; + public System.Windows.Forms.TextBox monitorPressureSourceChamber; + private System.Windows.Forms.Button GetData; + private System.Windows.Forms.Label PressureSourceChamber; + private System.Windows.Forms.TabPage FrequencyTab; + public System.Windows.Forms.Button synthSettingsUpdateButton; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + public System.Windows.Forms.CheckBox synthOnCheck; + private System.Windows.Forms.Label label7; + public System.Windows.Forms.TextBox synthOnAmpBox; + public System.Windows.Forms.TextBox synthOnFreqBox; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.GroupBox aom1Box; + public System.Windows.Forms.TextBox aom1FreqBox; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.GroupBox microwaveSynthGroupBox; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label18; + public System.Windows.Forms.TextBox aom1AmplitudeBox; + private System.Windows.Forms.Label label17; + public System.Windows.Forms.Button aom1UpdateButton; + + } +} + diff --git a/DecelerationHardwareControl/ControlWindow.cs b/DecelerationHardwareControl/ControlWindow.cs index 15254a8e..616cda01 100644 --- a/DecelerationHardwareControl/ControlWindow.cs +++ b/DecelerationHardwareControl/ControlWindow.cs @@ -1,193 +1,193 @@ -using NationalInstruments; -using NationalInstruments.UI; -using NationalInstruments.UI.WindowsForms; -using NationalInstruments.DAQmx; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace DecelerationHardwareControl -{ - public partial class ControlWindow : Form - { - - public Controller controller; - - public ControlWindow() - { - InitializeComponent(); - } - - - public void SetCheckBox(CheckBox box, bool state) - { - box.Invoke(new SetCheckDelegate(SetCheckHelper), new object[] { box, state }); - } - private delegate void SetCheckDelegate(CheckBox box, bool state); - private void SetCheckHelper(CheckBox box, bool state) - { - box.Checked = state; - } - - public void SetTextBox(TextBox box, string text) - { - box.Invoke(new SetTextDelegate(SetTextHelper), new object[] { box, text }); - } - private delegate void SetTextDelegate(TextBox box, string text); - private void SetTextHelper(TextBox box, string text) - { - box.Text = text; - } - - public void SetDiodeWarning(Led led, bool state) - { - led.Invoke(new SetWarningDelegate(SetWarningHelper), new object[] { led, state }); - } - private delegate void SetWarningDelegate(Led led, bool state); - private void SetWarningHelper(Led led, bool state) - { - led.Value = state; - } - - private void synthOnCheck_CheckedChanged(object sender, EventArgs e) - { - controller.EnableSynth(synthOnCheck.Checked); - } - - private void synthSettingsUpdateButton_Click(object sender, EventArgs e) - { - controller.UpdateSynthSettings(); - } - - private void GetData_Click(object sender, EventArgs e) - { - controller.UpdateMonitoring(); - } - - private void ReadFlow_Click(object sender, EventArgs e) - { - //controller.ReadFlowMeter(); - } - - private void SetFlow_Click(object sender, EventArgs e) - { - controller.SetFlowMeter(); - } - - private void monitorPressureSourceChamber_TextChanged(object sender, EventArgs e) - { - - } - - private void PressureSourceChamber_Click(object sender, EventArgs e) - { - - } - - - private void button2_Click(object sender, EventArgs e) - { - controller.StartSidebandRead(); - } - - private void scatterGraph1_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private void scatterGraph2_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private void scatterGraph5_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private void scatterGraph6_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private delegate void plotScatterGraphDelegate(ScatterPlot plot, double[] x, double[] y); - private void plotScatterGraphHelper(ScatterPlot plot, - double[] x, double[] y) - { - lock (this) - { - plot.ClearData(); - - plot.PlotXY(x, y); - } - } - - - private void scatterGraphPlot(ScatterGraph graph, ScatterPlot plot, double[] x, double[] y) - { - graph.Invoke(new plotScatterGraphDelegate(plotScatterGraphHelper), new object[] { plot, x, y }); - } - - public void displaySidebandData(ScatterGraph graph, double[] xvals, double[] data) - { - scatterGraphPlot(graph, scatterPlot1, xvals, data); - - } - - - public void displaySidebandData628V1(ScatterGraph graph, double[] xvals, double[] data) - { - scatterGraphPlot(graph, scatterPlot2, xvals, data); - } - - public void displaySidebandData531(ScatterGraph graph, double[] xvals, double[] data) - { - scatterGraphPlot(graph, scatterPlot5, xvals, data); - } - - public void displaySidebandData628Slowing(ScatterGraph graph, double[] xvals, double[] data) - { - scatterGraphPlot(graph, scatterPlot6, xvals, data); - } - - private void scatterGraph4_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private void scatterGraph1_PlotDataChanged_1(object sender, XYPlotDataChangedEventArgs e) - { - - } - - private void stopReadingButton_Click(object sender, EventArgs e) - { - controller.sidebandMonitorRunning = false; - } - - private void sideBandTab_Click(object sender, EventArgs e) - { - - } - - private void aom1UpdateButton_Click(object sender, EventArgs e) - { - double freq = double.Parse(aom1FreqBox.Text); - double amp = double.Parse(aom1AmplitudeBox.Text); - controller.SetMOTAOMFreq(freq); - controller.SetMOTAOMAmp(amp); - } - - - - - - - - - } +using NationalInstruments; +using NationalInstruments.UI; +using NationalInstruments.UI.WindowsForms; +using NationalInstruments.DAQmx; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace DecelerationHardwareControl +{ + public partial class ControlWindow : Form + { + + public Controller controller; + + public ControlWindow() + { + InitializeComponent(); + } + + + public void SetCheckBox(CheckBox box, bool state) + { + box.Invoke(new SetCheckDelegate(SetCheckHelper), new object[] { box, state }); + } + private delegate void SetCheckDelegate(CheckBox box, bool state); + private void SetCheckHelper(CheckBox box, bool state) + { + box.Checked = state; + } + + public void SetTextBox(TextBox box, string text) + { + box.Invoke(new SetTextDelegate(SetTextHelper), new object[] { box, text }); + } + private delegate void SetTextDelegate(TextBox box, string text); + private void SetTextHelper(TextBox box, string text) + { + box.Text = text; + } + + public void SetDiodeWarning(Led led, bool state) + { + led.Invoke(new SetWarningDelegate(SetWarningHelper), new object[] { led, state }); + } + private delegate void SetWarningDelegate(Led led, bool state); + private void SetWarningHelper(Led led, bool state) + { + led.Value = state; + } + + private void synthOnCheck_CheckedChanged(object sender, EventArgs e) + { + controller.EnableSynth(synthOnCheck.Checked); + } + + private void synthSettingsUpdateButton_Click(object sender, EventArgs e) + { + controller.UpdateSynthSettings(); + } + + private void GetData_Click(object sender, EventArgs e) + { + controller.UpdateMonitoring(); + } + + private void ReadFlow_Click(object sender, EventArgs e) + { + //controller.ReadFlowMeter(); + } + + private void SetFlow_Click(object sender, EventArgs e) + { + controller.SetFlowMeter(); + } + + private void monitorPressureSourceChamber_TextChanged(object sender, EventArgs e) + { + + } + + private void PressureSourceChamber_Click(object sender, EventArgs e) + { + + } + + + private void button2_Click(object sender, EventArgs e) + { + controller.StartSidebandRead(); + } + + private void scatterGraph1_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private void scatterGraph2_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private void scatterGraph5_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private void scatterGraph6_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private delegate void plotScatterGraphDelegate(ScatterPlot plot, double[] x, double[] y); + private void plotScatterGraphHelper(ScatterPlot plot, + double[] x, double[] y) + { + lock (this) + { + plot.ClearData(); + + plot.PlotXY(x, y); + } + } + + + private void scatterGraphPlot(ScatterGraph graph, ScatterPlot plot, double[] x, double[] y) + { + graph.Invoke(new plotScatterGraphDelegate(plotScatterGraphHelper), new object[] { plot, x, y }); + } + + public void displaySidebandData(ScatterGraph graph, double[] xvals, double[] data) + { + scatterGraphPlot(graph, scatterPlot1, xvals, data); + + } + + + public void displaySidebandData628V1(ScatterGraph graph, double[] xvals, double[] data) + { + scatterGraphPlot(graph, scatterPlot2, xvals, data); + } + + public void displaySidebandData531(ScatterGraph graph, double[] xvals, double[] data) + { + scatterGraphPlot(graph, scatterPlot5, xvals, data); + } + + public void displaySidebandData628Slowing(ScatterGraph graph, double[] xvals, double[] data) + { + scatterGraphPlot(graph, scatterPlot6, xvals, data); + } + + private void scatterGraph4_PlotDataChanged(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private void scatterGraph1_PlotDataChanged_1(object sender, XYPlotDataChangedEventArgs e) + { + + } + + private void stopReadingButton_Click(object sender, EventArgs e) + { + controller.sidebandMonitorRunning = false; + } + + private void sideBandTab_Click(object sender, EventArgs e) + { + + } + + private void aom1UpdateButton_Click(object sender, EventArgs e) + { + double freq = double.Parse(aom1FreqBox.Text); + double amp = double.Parse(aom1AmplitudeBox.Text); + controller.SetMOTAOMFreq(freq); + controller.SetMOTAOMAmp(amp); + } + + + + + + + + + } } \ No newline at end of file diff --git a/DecelerationHardwareControl/ControlWindow.resx b/DecelerationHardwareControl/ControlWindow.resx index 3b342041..98771367 100644 --- a/DecelerationHardwareControl/ControlWindow.resx +++ b/DecelerationHardwareControl/ControlWindow.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + \ No newline at end of file diff --git a/DecelerationHardwareControl/Controller.cs b/DecelerationHardwareControl/Controller.cs index 9fe6bd7e..ed94ccf7 100644 --- a/DecelerationHardwareControl/Controller.cs +++ b/DecelerationHardwareControl/Controller.cs @@ -1,476 +1,476 @@ -using System; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using System.Threading; -using DAQ.Environment; -using DAQ.HAL; -using DAQ.TransferCavityLock; -using NationalInstruments.DAQmx; -using NationalInstruments; - -namespace DecelerationHardwareControl -{ - public class Controller : MarshalByRefObject, TransferCavityLockable - { - #region Constants - private const double synthOffAmplitude = -130.0; - #endregion - - ControlWindow window; - - HP8673BSynth synth = (HP8673BSynth)Environs.Hardware.Instruments["synth"]; -// FlowMeter flowMeter = (FlowMeter)Environs.Hardware.Instruments["flowmeter"]; - - private TransferCavityLockable TCLHelper = new DAQMxTCLHelperSWTimed - ("cavity", "analogTrigger3", "laser", "p2", "p1", "analogTrigger2", "cavityTriggerOut"); - - private static Hashtable calibrations = Environs.Hardware.Calibrations; - - public bool sidebandMonitorRunning = false; - private string[] sidebandChannelList = {"cavityVoltage","mot606", "mot628V1","slowing531","slowing628V1"}; - private Task sidebandMonitorTask = new Task("sidebandMonitor"); - private AnalogMultiChannelReader sidebandReader; - private int sidebandMonitorSampleRate = 2500; - private int sidebandMonitorSamplesPerChannel = 4000; - private int waitBetweenReads = 1000; - - private bool analogsAvailable; - private double lastCavityData; - private double lastrefCavityData; - private DateTime cavityTimestamp; - private DateTime refcavityTimestamp; - private double laserFrequencyControlVoltage; - - private Dictionary analogTasks = new Dictionary(); - - private Task motAOMFreqOutputTask = new Task("MOTAOMFrequencyOutput"); - private AnalogOutputChannel motAOMFreqChannel = (AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels["motAOMFreq"]; - private Task motAOMAmpOutputTask = new Task("MOTAOMAmplitudeOutput"); - private AnalogOutputChannel motAOMAmpChannel = (AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels["motAOMAmp"]; - - public AnalogSingleChannelWriter analogWriter; - - - private AnalogInputChannel pressureSourceChamber = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["PressureSourceChamber"]; - private Task pressureMonitorTask = new Task(); - private AnalogInputChannel pressureRough = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["RoughVacuum"]; - private Task roughVacuumTask = new Task(); - private AnalogInputChannel voltageReference = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["VoltageReference"]; - private Task voltageReferenceTask = new Task(); - private AnalogInputChannel therm30KTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["10KThermistor30KPlate"]; - private Task thermistor30KPlateTask = new Task(); - private AnalogInputChannel shieldTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["30KShield"]; - private Task shieldTask = new Task(); - private AnalogInputChannel cellTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["4KCell"]; - private Task cellTask = new Task(); - - public string command; - - - - public double normsigGain; - - public double SynthOnFrequency - { - get - { - return Double.Parse(window.synthOnFreqBox.Text); - } - set - { - window.SetTextBox(window.synthOnFreqBox, value.ToString()); - } - } - - public double SynthOnAmplitude - { - get - { - return Double.Parse(window.synthOnAmpBox.Text); - } - set - { - window.SetTextBox(window.synthOnAmpBox, value.ToString()); - } - } - - // The keys of the hashtable are the names of the analog output channels - // The values are all booleans - true means the channel is blocked - private Hashtable analogOutputsBlocked; - - - // without this method, any remote connections to this object will time out after - // five minutes of inactivity. - // It just overrides the lifetime lease system completely. - public override Object InitializeLifetimeService() - { - return null; - } - - public void AddAnalogOutput(Task task, AnalogOutputChannel channel, string channelName, double lowLimit, double highLimit) - { - channel.AddToTask(task, lowLimit, highLimit); - task.Control(TaskAction.Verify); - analogTasks.Add(channelName, task); - } - - public void Start() - { - analogsAvailable = true; - // all the analog outputs are unblocked at the outset - analogOutputsBlocked = new Hashtable(); - foreach (DictionaryEntry de in Environs.Hardware.AnalogOutputChannels) - analogOutputsBlocked.Add(de.Key, false); - - AddAnalogOutput(motAOMFreqOutputTask, motAOMFreqChannel, "motAOMFreq", -10, 10); - AddAnalogOutput(motAOMAmpOutputTask, motAOMAmpChannel, "motAOMAmp", -10, 10); - - - pressureSourceChamber.AddToTask(pressureMonitorTask, -10, 10); - pressureRough.AddToTask(roughVacuumTask, -10, 10); - voltageReference.AddToTask(voltageReferenceTask, -10, 10); - therm30KTemp.AddToTask(thermistor30KPlateTask, -10, 10); - shieldTemp.AddToTask(shieldTask, -10, 10); - cellTemp.AddToTask(cellTask, -10, 10); - InitializeSidebandRead(); - - - - window = new ControlWindow(); - window.controller = this; - Application.Run(window); - } - - // Applications may set this control voltage themselves, but when they do - // they should set this property too - public double LaserFrequencyControlVoltage - { - get { return laserFrequencyControlVoltage; } - set { laserFrequencyControlVoltage = value; } - } - - // returns true if the channel is blocked - public bool GetAnalogOutputBlockedStatus(string channel) - { - return (bool)analogOutputsBlocked[channel]; - } - - // set to true to block the output channel - public void SetAnalogOutputBlockedStatus(string channel, bool state) - { - analogOutputsBlocked[channel] = state; - } - - - public bool AnalogInputsAvailable - { - get { return analogsAvailable; } - set { analogsAvailable = value; } - } - - public void UpdateLockCavityData(double cavityValue) - { - lastCavityData = cavityValue; - cavityTimestamp = DateTime.Now; - } - - public void UpdateReferenceCavityData(double refcavityValue) - { - lastrefCavityData = refcavityValue; - refcavityTimestamp = DateTime.Now; - } - - public double LastCavityData - { - get { return lastCavityData; } - } - - public DateTime LastCavityTimeStamp - { - get { return cavityTimestamp; } - } - - public double TimeSinceLastCavityRead - { - get - { - TimeSpan delta = DateTime.Now - cavityTimestamp; - return (delta.Milliseconds + 1000 * delta.Seconds + 60 * 1000 * delta.Minutes); - } - } - - public void SetMOTAOMFreq(double frequency) - { - SetAnalogOutput("motAOMFreq", frequency, true); - } - - public void SetMOTAOMAmp(double amplitude) - { - SetAnalogOutput("motAOMAmp", amplitude, true); - } - - public class CalibrationException : ArgumentOutOfRangeException { }; - public void SetAnalogOutput(string channel, double value, bool useCalibration) - { - - analogWriter = new AnalogSingleChannelWriter(analogTasks[channel].Stream); - bool changeIt = true; - double output = 0.0; - if (useCalibration) - { - try - { - output = ((Calibration)calibrations[channel]).Convert(value); - } - catch (DAQ.HAL.Calibration.CalibrationRangeException) - { - MessageBox.Show("The number is outside the calibrated range. The value will not be updated."); - changeIt = false; - } - catch - { - MessageBox.Show("Calibration error"); - changeIt = false; - } - } - else - { - output = value; - } - if (changeIt) - { - try - { - analogWriter.WriteSingleSample(true, output); - analogTasks[channel].Control(TaskAction.Unreserve); - } - catch (Exception e) - { - MessageBox.Show(e.Message); - } - } - } - - #region TransferCavityLockable Members - - public void ConfigureCavityScan(int numberOfSteps, bool autostart) - { - TCLHelper.ConfigureCavityScan(numberOfSteps, autostart); - } - - public void ConfigureReadPhotodiodes(int numberOfMeasurements, bool autostart) - { - TCLHelper.ConfigureReadPhotodiodes(numberOfMeasurements, autostart); - } - - public void ConfigureSetLaserVoltage(double voltage) - { - TCLHelper.ConfigureSetLaserVoltage(voltage); - } - - public void ConfigureScanTrigger() - { - TCLHelper.ConfigureScanTrigger(); - } - - public void ScanCavity(double[] rampVoltages, bool autostart) - { - TCLHelper.ScanCavity(rampVoltages, autostart); - } - - public void StartScan() - { - TCLHelper.StartScan(); - } - - public void StopScan() - { - TCLHelper.StopScan(); - } - - public double[,] ReadPhotodiodes(int numberOfMeasurements) - { - return TCLHelper.ReadPhotodiodes(numberOfMeasurements); - } - - public void SetLaserVoltage(double voltage) - { - TCLHelper.SetLaserVoltage(voltage); - } - - public void ReleaseCavityHardware() - { - TCLHelper.ReleaseCavityHardware(); - } - - public void SendScanTriggerAndWaitUntilDone() - { - TCLHelper.SendScanTriggerAndWaitUntilDone(); - } - public void ReleaseLaser() - { - TCLHelper.ReleaseLaser(); - } - - public void EnableSynth(bool enable) - { - synth.Connect(); - if (enable) - { - synth.Frequency = SynthOnFrequency; - synth.Amplitude = SynthOnAmplitude; - synth.Enabled = true; - } - else - { - synth.Enabled = false; - } - synth.Disconnect(); - } - - public void UpdateSynthSettings() - { - synth.Connect(); - synth.Frequency = SynthOnFrequency; - synth.Amplitude = SynthOnAmplitude; - synth.Disconnect(); - } - - private double VoltageResistanceConversion(double voltage, double Vref) - { - return 47120 * (voltage / (Vref - voltage)); - } - - private double VoltageRoughVacuumConversion(double voltage) - { - return Math.Pow(10, ((voltage - 6.143)/1.286)); - } - - private double VoltagePressureConversion(double voltage) - { - return Math.Pow(10, (1.667 * voltage - 11.33)); - } - - public void UpdateMonitoring() - { - AnalogSingleChannelReader reader3 = new AnalogSingleChannelReader(voltageReferenceTask.Stream); - double Vref = reader3.ReadSingleSample(); - - AnalogSingleChannelReader reader1 = new AnalogSingleChannelReader(pressureMonitorTask.Stream); - double analogDataIn1 = reader1.ReadSingleSample(); - window.monitorPressureSourceChamber.Text = VoltagePressureConversion(analogDataIn1).ToString("E02",CultureInfo.InvariantCulture); - - AnalogSingleChannelReader reader2 = new AnalogSingleChannelReader(roughVacuumTask.Stream); - double analogDataIn2 = reader2.ReadSingleSample(); - window.monitorRoughVacuum.Text = VoltageRoughVacuumConversion(analogDataIn2).ToString("E02", CultureInfo.InvariantCulture); - - - AnalogSingleChannelReader reader4 = new AnalogSingleChannelReader(thermistor30KPlateTask.Stream); - double analogDataIn4 = reader4.ReadSingleSample(); - window.monitor10KTherm30KPlate.Text = VoltageResistanceConversion(analogDataIn4, Vref).ToString("E04", CultureInfo.InvariantCulture); - - AnalogSingleChannelReader reader5 = new AnalogSingleChannelReader(shieldTask.Stream); - double analogDataIn5 = reader5.ReadSingleSample(); - window.monitorShield.Text = VoltageResistanceConversion(analogDataIn5, Vref).ToString("E04", CultureInfo.InvariantCulture); - - AnalogSingleChannelReader reader6 = new AnalogSingleChannelReader(cellTask.Stream); - double analogDataIn6 = reader6.ReadSingleSample(); - window.monitorColdPlate.Text = VoltageResistanceConversion(analogDataIn6, Vref).ToString("E04", CultureInfo.InvariantCulture); - } - - - - public void InitializeSidebandRead() - { - foreach (string channel in sidebandChannelList) - ((AnalogInputChannel)Environs.Hardware.AnalogInputChannels[channel]).AddToTask( - sidebandMonitorTask, - 0, 10); - - // internal clock, finite acquisition - sidebandMonitorTask.Timing.ConfigureSampleClock( - "", - sidebandMonitorSampleRate, - SampleClockActiveEdge.Rising, - SampleQuantityMode.FiniteSamples, - sidebandMonitorSamplesPerChannel); - - sidebandMonitorTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( - (string)Environs.Hardware.GetInfo("usbAnalogTrigger"), - DigitalEdgeStartTriggerEdge.Rising); - - sidebandMonitorTask.Control(TaskAction.Verify); - - sidebandReader = new AnalogMultiChannelReader(sidebandMonitorTask.Stream); - } - - public void StartSidebandRead() - { - Thread readSidebandsThread = new Thread(new ThreadStart(ReadSidebands)); - readSidebandsThread.Start(); - } - - - private double[,] sidebandData; - public void ReadSidebands() - { - sidebandMonitorRunning = true; - while (sidebandMonitorRunning) - { - - sidebandMonitorTask.Start(); - sidebandData = sidebandReader.ReadMultiSample(sidebandMonitorSamplesPerChannel); - sidebandMonitorTask.Stop(); - - double[] xvals = new double[sidebandMonitorSamplesPerChannel]; - double[] yvals606 = new double[sidebandMonitorSamplesPerChannel]; - double[] yvals628V1 = new double[sidebandMonitorSamplesPerChannel]; - double[] yvals531 = new double[sidebandMonitorSamplesPerChannel]; - double[] yvals628Slowing = new double[sidebandMonitorSamplesPerChannel]; - for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) - xvals[j] = sidebandData[0, j]; - for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) - yvals606[j] = sidebandData[1, j]; - for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) - yvals628V1[j] = sidebandData[2, j]; - for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) - yvals531[j] = sidebandData[3, j]; - for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) - yvals628Slowing[j] = sidebandData[4, j]; - - window.displaySidebandData(window.scatterGraph1, xvals, yvals606); - window.displaySidebandData628V1(window.scatterGraph2, xvals, yvals628V1); - window.displaySidebandData531(window.scatterGraph6, xvals, yvals531); - window.displaySidebandData628Slowing(window.scatterGraph5, xvals, yvals628Slowing); - - Thread.Sleep(waitBetweenReads); - } - } - - - public string GetCommand() - { - return window.CommandBox.Text; - } - - //public void ReadFlowMeter() - //{ - //string - //window.SetTextBox(window.CommandBox, value.ToString()); - - //return window.CommandBox.Text; - //} - - - - public void SetFlowMeter() - { - // flowMeter.SetFlow(GetCommand()); - } - - #endregion - } +using System; +using System.Globalization; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Threading; +using DAQ.Environment; +using DAQ.HAL; +using DAQ.TransferCavityLock; +using NationalInstruments.DAQmx; +using NationalInstruments; + +namespace DecelerationHardwareControl +{ + public class Controller : MarshalByRefObject, TransferCavityLockable + { + #region Constants + private const double synthOffAmplitude = -130.0; + #endregion + + ControlWindow window; + + HP8673BSynth synth = (HP8673BSynth)Environs.Hardware.Instruments["synth"]; +// FlowMeter flowMeter = (FlowMeter)Environs.Hardware.Instruments["flowmeter"]; + + private TransferCavityLockable TCLHelper = new DAQMxTCLHelperSWTimed + ("cavity", "analogTrigger3", "laser", "p2", "p1", "analogTrigger2", "cavityTriggerOut"); + + private static Hashtable calibrations = Environs.Hardware.Calibrations; + + public bool sidebandMonitorRunning = false; + private string[] sidebandChannelList = {"cavityVoltage","mot606", "mot628V1","slowing531","slowing628V1"}; + private Task sidebandMonitorTask = new Task("sidebandMonitor"); + private AnalogMultiChannelReader sidebandReader; + private int sidebandMonitorSampleRate = 2500; + private int sidebandMonitorSamplesPerChannel = 4000; + private int waitBetweenReads = 1000; + + private bool analogsAvailable; + private double lastCavityData; + private double lastrefCavityData; + private DateTime cavityTimestamp; + private DateTime refcavityTimestamp; + private double laserFrequencyControlVoltage; + + private Dictionary analogTasks = new Dictionary(); + + private Task motAOMFreqOutputTask = new Task("MOTAOMFrequencyOutput"); + private AnalogOutputChannel motAOMFreqChannel = (AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels["motAOMFreq"]; + private Task motAOMAmpOutputTask = new Task("MOTAOMAmplitudeOutput"); + private AnalogOutputChannel motAOMAmpChannel = (AnalogOutputChannel)Environs.Hardware.AnalogOutputChannels["motAOMAmp"]; + + public AnalogSingleChannelWriter analogWriter; + + + private AnalogInputChannel pressureSourceChamber = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["PressureSourceChamber"]; + private Task pressureMonitorTask = new Task(); + private AnalogInputChannel pressureRough = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["RoughVacuum"]; + private Task roughVacuumTask = new Task(); + private AnalogInputChannel voltageReference = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["VoltageReference"]; + private Task voltageReferenceTask = new Task(); + private AnalogInputChannel therm30KTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["10KThermistor30KPlate"]; + private Task thermistor30KPlateTask = new Task(); + private AnalogInputChannel shieldTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["30KShield"]; + private Task shieldTask = new Task(); + private AnalogInputChannel cellTemp = (AnalogInputChannel)Environs.Hardware.AnalogInputChannels["4KCell"]; + private Task cellTask = new Task(); + + public string command; + + + + public double normsigGain; + + public double SynthOnFrequency + { + get + { + return Double.Parse(window.synthOnFreqBox.Text); + } + set + { + window.SetTextBox(window.synthOnFreqBox, value.ToString()); + } + } + + public double SynthOnAmplitude + { + get + { + return Double.Parse(window.synthOnAmpBox.Text); + } + set + { + window.SetTextBox(window.synthOnAmpBox, value.ToString()); + } + } + + // The keys of the hashtable are the names of the analog output channels + // The values are all booleans - true means the channel is blocked + private Hashtable analogOutputsBlocked; + + + // without this method, any remote connections to this object will time out after + // five minutes of inactivity. + // It just overrides the lifetime lease system completely. + public override Object InitializeLifetimeService() + { + return null; + } + + public void AddAnalogOutput(Task task, AnalogOutputChannel channel, string channelName, double lowLimit, double highLimit) + { + channel.AddToTask(task, lowLimit, highLimit); + task.Control(TaskAction.Verify); + analogTasks.Add(channelName, task); + } + + public void Start() + { + analogsAvailable = true; + // all the analog outputs are unblocked at the outset + analogOutputsBlocked = new Hashtable(); + foreach (DictionaryEntry de in Environs.Hardware.AnalogOutputChannels) + analogOutputsBlocked.Add(de.Key, false); + + AddAnalogOutput(motAOMFreqOutputTask, motAOMFreqChannel, "motAOMFreq", -10, 10); + AddAnalogOutput(motAOMAmpOutputTask, motAOMAmpChannel, "motAOMAmp", -10, 10); + + + pressureSourceChamber.AddToTask(pressureMonitorTask, -10, 10); + pressureRough.AddToTask(roughVacuumTask, -10, 10); + voltageReference.AddToTask(voltageReferenceTask, -10, 10); + therm30KTemp.AddToTask(thermistor30KPlateTask, -10, 10); + shieldTemp.AddToTask(shieldTask, -10, 10); + cellTemp.AddToTask(cellTask, -10, 10); + InitializeSidebandRead(); + + + + window = new ControlWindow(); + window.controller = this; + Application.Run(window); + } + + // Applications may set this control voltage themselves, but when they do + // they should set this property too + public double LaserFrequencyControlVoltage + { + get { return laserFrequencyControlVoltage; } + set { laserFrequencyControlVoltage = value; } + } + + // returns true if the channel is blocked + public bool GetAnalogOutputBlockedStatus(string channel) + { + return (bool)analogOutputsBlocked[channel]; + } + + // set to true to block the output channel + public void SetAnalogOutputBlockedStatus(string channel, bool state) + { + analogOutputsBlocked[channel] = state; + } + + + public bool AnalogInputsAvailable + { + get { return analogsAvailable; } + set { analogsAvailable = value; } + } + + public void UpdateLockCavityData(double cavityValue) + { + lastCavityData = cavityValue; + cavityTimestamp = DateTime.Now; + } + + public void UpdateReferenceCavityData(double refcavityValue) + { + lastrefCavityData = refcavityValue; + refcavityTimestamp = DateTime.Now; + } + + public double LastCavityData + { + get { return lastCavityData; } + } + + public DateTime LastCavityTimeStamp + { + get { return cavityTimestamp; } + } + + public double TimeSinceLastCavityRead + { + get + { + TimeSpan delta = DateTime.Now - cavityTimestamp; + return (delta.Milliseconds + 1000 * delta.Seconds + 60 * 1000 * delta.Minutes); + } + } + + public void SetMOTAOMFreq(double frequency) + { + SetAnalogOutput("motAOMFreq", frequency, true); + } + + public void SetMOTAOMAmp(double amplitude) + { + SetAnalogOutput("motAOMAmp", amplitude, true); + } + + public class CalibrationException : ArgumentOutOfRangeException { }; + public void SetAnalogOutput(string channel, double value, bool useCalibration) + { + + analogWriter = new AnalogSingleChannelWriter(analogTasks[channel].Stream); + bool changeIt = true; + double output = 0.0; + if (useCalibration) + { + try + { + output = ((Calibration)calibrations[channel]).Convert(value); + } + catch (DAQ.HAL.Calibration.CalibrationRangeException) + { + MessageBox.Show("The number is outside the calibrated range. The value will not be updated."); + changeIt = false; + } + catch + { + MessageBox.Show("Calibration error"); + changeIt = false; + } + } + else + { + output = value; + } + if (changeIt) + { + try + { + analogWriter.WriteSingleSample(true, output); + analogTasks[channel].Control(TaskAction.Unreserve); + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + } + + #region TransferCavityLockable Members + + public void ConfigureCavityScan(int numberOfSteps, bool autostart) + { + TCLHelper.ConfigureCavityScan(numberOfSteps, autostart); + } + + public void ConfigureReadPhotodiodes(int numberOfMeasurements, bool autostart) + { + TCLHelper.ConfigureReadPhotodiodes(numberOfMeasurements, autostart); + } + + public void ConfigureSetLaserVoltage(double voltage) + { + TCLHelper.ConfigureSetLaserVoltage(voltage); + } + + public void ConfigureScanTrigger() + { + TCLHelper.ConfigureScanTrigger(); + } + + public void ScanCavity(double[] rampVoltages, bool autostart) + { + TCLHelper.ScanCavity(rampVoltages, autostart); + } + + public void StartScan() + { + TCLHelper.StartScan(); + } + + public void StopScan() + { + TCLHelper.StopScan(); + } + + public double[,] ReadPhotodiodes(int numberOfMeasurements) + { + return TCLHelper.ReadPhotodiodes(numberOfMeasurements); + } + + public void SetLaserVoltage(double voltage) + { + TCLHelper.SetLaserVoltage(voltage); + } + + public void ReleaseCavityHardware() + { + TCLHelper.ReleaseCavityHardware(); + } + + public void SendScanTriggerAndWaitUntilDone() + { + TCLHelper.SendScanTriggerAndWaitUntilDone(); + } + public void ReleaseLaser() + { + TCLHelper.ReleaseLaser(); + } + + public void EnableSynth(bool enable) + { + synth.Connect(); + if (enable) + { + synth.Frequency = SynthOnFrequency; + synth.Amplitude = SynthOnAmplitude; + synth.Enabled = true; + } + else + { + synth.Enabled = false; + } + synth.Disconnect(); + } + + public void UpdateSynthSettings() + { + synth.Connect(); + synth.Frequency = SynthOnFrequency; + synth.Amplitude = SynthOnAmplitude; + synth.Disconnect(); + } + + private double VoltageResistanceConversion(double voltage, double Vref) + { + return 47120 * (voltage / (Vref - voltage)); + } + + private double VoltageRoughVacuumConversion(double voltage) + { + return Math.Pow(10, ((voltage - 6.143)/1.286)); + } + + private double VoltagePressureConversion(double voltage) + { + return Math.Pow(10, (1.667 * voltage - 11.33)); + } + + public void UpdateMonitoring() + { + AnalogSingleChannelReader reader3 = new AnalogSingleChannelReader(voltageReferenceTask.Stream); + double Vref = reader3.ReadSingleSample(); + + AnalogSingleChannelReader reader1 = new AnalogSingleChannelReader(pressureMonitorTask.Stream); + double analogDataIn1 = reader1.ReadSingleSample(); + window.monitorPressureSourceChamber.Text = VoltagePressureConversion(analogDataIn1).ToString("E02",CultureInfo.InvariantCulture); + + AnalogSingleChannelReader reader2 = new AnalogSingleChannelReader(roughVacuumTask.Stream); + double analogDataIn2 = reader2.ReadSingleSample(); + window.monitorRoughVacuum.Text = VoltageRoughVacuumConversion(analogDataIn2).ToString("E02", CultureInfo.InvariantCulture); + + + AnalogSingleChannelReader reader4 = new AnalogSingleChannelReader(thermistor30KPlateTask.Stream); + double analogDataIn4 = reader4.ReadSingleSample(); + window.monitor10KTherm30KPlate.Text = VoltageResistanceConversion(analogDataIn4, Vref).ToString("E04", CultureInfo.InvariantCulture); + + AnalogSingleChannelReader reader5 = new AnalogSingleChannelReader(shieldTask.Stream); + double analogDataIn5 = reader5.ReadSingleSample(); + window.monitorShield.Text = VoltageResistanceConversion(analogDataIn5, Vref).ToString("E04", CultureInfo.InvariantCulture); + + AnalogSingleChannelReader reader6 = new AnalogSingleChannelReader(cellTask.Stream); + double analogDataIn6 = reader6.ReadSingleSample(); + window.monitorColdPlate.Text = VoltageResistanceConversion(analogDataIn6, Vref).ToString("E04", CultureInfo.InvariantCulture); + } + + + + public void InitializeSidebandRead() + { + foreach (string channel in sidebandChannelList) + ((AnalogInputChannel)Environs.Hardware.AnalogInputChannels[channel]).AddToTask( + sidebandMonitorTask, + 0, 10); + + // internal clock, finite acquisition + sidebandMonitorTask.Timing.ConfigureSampleClock( + "", + sidebandMonitorSampleRate, + SampleClockActiveEdge.Rising, + SampleQuantityMode.FiniteSamples, + sidebandMonitorSamplesPerChannel); + + sidebandMonitorTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger( + (string)Environs.Hardware.GetInfo("usbAnalogTrigger"), + DigitalEdgeStartTriggerEdge.Rising); + + sidebandMonitorTask.Control(TaskAction.Verify); + + sidebandReader = new AnalogMultiChannelReader(sidebandMonitorTask.Stream); + } + + public void StartSidebandRead() + { + Thread readSidebandsThread = new Thread(new ThreadStart(ReadSidebands)); + readSidebandsThread.Start(); + } + + + private double[,] sidebandData; + public void ReadSidebands() + { + sidebandMonitorRunning = true; + while (sidebandMonitorRunning) + { + + sidebandMonitorTask.Start(); + sidebandData = sidebandReader.ReadMultiSample(sidebandMonitorSamplesPerChannel); + sidebandMonitorTask.Stop(); + + double[] xvals = new double[sidebandMonitorSamplesPerChannel]; + double[] yvals606 = new double[sidebandMonitorSamplesPerChannel]; + double[] yvals628V1 = new double[sidebandMonitorSamplesPerChannel]; + double[] yvals531 = new double[sidebandMonitorSamplesPerChannel]; + double[] yvals628Slowing = new double[sidebandMonitorSamplesPerChannel]; + for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) + xvals[j] = sidebandData[0, j]; + for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) + yvals606[j] = sidebandData[1, j]; + for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) + yvals628V1[j] = sidebandData[2, j]; + for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) + yvals531[j] = sidebandData[3, j]; + for (int j = 0; j < sidebandMonitorSamplesPerChannel; j++) + yvals628Slowing[j] = sidebandData[4, j]; + + window.displaySidebandData(window.scatterGraph1, xvals, yvals606); + window.displaySidebandData628V1(window.scatterGraph2, xvals, yvals628V1); + window.displaySidebandData531(window.scatterGraph6, xvals, yvals531); + window.displaySidebandData628Slowing(window.scatterGraph5, xvals, yvals628Slowing); + + Thread.Sleep(waitBetweenReads); + } + } + + + public string GetCommand() + { + return window.CommandBox.Text; + } + + //public void ReadFlowMeter() + //{ + //string + //window.SetTextBox(window.CommandBox, value.ToString()); + + //return window.CommandBox.Text; + //} + + + + public void SetFlowMeter() + { + // flowMeter.SetFlow(GetCommand()); + } + + #endregion + } } \ No newline at end of file diff --git a/DecelerationHardwareControl/DecelerationHardwareControl.csproj b/DecelerationHardwareControl/DecelerationHardwareControl.csproj index b1eb930a..41ca42d2 100644 --- a/DecelerationHardwareControl/DecelerationHardwareControl.csproj +++ b/DecelerationHardwareControl/DecelerationHardwareControl.csproj @@ -1,152 +1,154 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90} - WinExe - Properties - DecelerationHardwareControl - DecelerationHardwareControl - - - 3.5 - - - v4.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\EDMTestCrate\ - - - - - - - - - 3.5 - - - - - - - - - - - - Form - - - ControlWindow.cs - - - - - Designer - ControlWindow.cs - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - DAQ - - - - + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90} + WinExe + Properties + DecelerationHardwareControl + DecelerationHardwareControl + + + 3.5 + + + v4.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\EDMTestCrate\ + + + + + False + + + + + + 3.5 + + + + + + + + + + + + Form + + + ControlWindow.cs + + + + + Designer + ControlWindow.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + DAQ + + + + \ No newline at end of file diff --git a/DecelerationLaserLock/DecelerationLaserLock.csproj b/DecelerationLaserLock/DecelerationLaserLock.csproj index 4780e78d..f27fa1db 100644 --- a/DecelerationLaserLock/DecelerationLaserLock.csproj +++ b/DecelerationLaserLock/DecelerationLaserLock.csproj @@ -1,169 +1,168 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA} - WinExe - Properties - DecelerationLaserLock - DecelerationLaserLock - DecelerationLaserLock.Runner - - - 3.5 - 0 - - - v4.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\EDMTestCrate\ - - - - - False - ..\..\..\..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll - - - - - - 3.5 - - - - - - - - - - - - Form - - - MainForm.cs - - - - - Designer - MainForm.cs - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - DAQ - - - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90} - DecelerationHardwareControl - - - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40} - ScanMaster - - - {BA0A0540-3F1C-483B-A180-CB78DF424F15} - SharedCode - - - - + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA} + WinExe + Properties + DecelerationLaserLock + DecelerationLaserLock + DecelerationLaserLock.Runner + + + 3.5 + 0 + + + v4.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\EDMTestCrate\ + + + + + False + + + + + + 3.5 + + + + + + + + + + + + Form + + + MainForm.cs + + + + + Designer + MainForm.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + DAQ + + + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90} + DecelerationHardwareControl + + + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40} + ScanMaster + + + {BA0A0540-3F1C-483B-A180-CB78DF424F15} + SharedCode + + + + \ No newline at end of file diff --git a/DecelerationLaserLock/MainForm.Designer.cs b/DecelerationLaserLock/MainForm.Designer.cs index 5060ab4f..36508bba 100644 --- a/DecelerationLaserLock/MainForm.Designer.cs +++ b/DecelerationLaserLock/MainForm.Designer.cs @@ -88,27 +88,27 @@ private void InitializeComponent() this.lockToolStripMenuItem, this.unlockToolStripMenuItem}); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(54, 20); + this.toolStripMenuItem1.Size = new System.Drawing.Size(59, 20); this.toolStripMenuItem1.Text = "Actions"; // // parkToolStripMenuItem // this.parkToolStripMenuItem.Name = "parkToolStripMenuItem"; - this.parkToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.parkToolStripMenuItem.Size = new System.Drawing.Size(111, 22); this.parkToolStripMenuItem.Text = "Park"; this.parkToolStripMenuItem.Click += new System.EventHandler(this.parkToolStripMenuItem_Click); // // lockToolStripMenuItem // this.lockToolStripMenuItem.Name = "lockToolStripMenuItem"; - this.lockToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.lockToolStripMenuItem.Size = new System.Drawing.Size(111, 22); this.lockToolStripMenuItem.Text = "Lock"; this.lockToolStripMenuItem.Click += new System.EventHandler(this.lockToolStripMenuItem_Click); // // unlockToolStripMenuItem // this.unlockToolStripMenuItem.Name = "unlockToolStripMenuItem"; - this.unlockToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.unlockToolStripMenuItem.Size = new System.Drawing.Size(111, 22); this.unlockToolStripMenuItem.Text = "Unlock"; this.unlockToolStripMenuItem.Click += new System.EventHandler(this.unlockToolStripMenuItem_Click); // @@ -124,12 +124,12 @@ private void InitializeComponent() // // controlVoltageNumericEditor // - this.controlVoltageNumericEditor.CoercionInterval = 0.005; + this.controlVoltageNumericEditor.CoercionInterval = 0.005D; this.controlVoltageNumericEditor.FormatMode = NationalInstruments.UI.NumericFormatMode.CreateSimpleDoubleMode(3); this.controlVoltageNumericEditor.Location = new System.Drawing.Point(91, 26); this.controlVoltageNumericEditor.Name = "controlVoltageNumericEditor"; this.controlVoltageNumericEditor.OutOfRangeMode = NationalInstruments.UI.NumericOutOfRangeMode.CoerceToRange; - this.controlVoltageNumericEditor.Range = new NationalInstruments.UI.Range(-10, 10); + this.controlVoltageNumericEditor.Range = new NationalInstruments.UI.Range(-10D, 10D); this.controlVoltageNumericEditor.Size = new System.Drawing.Size(61, 20); this.controlVoltageNumericEditor.TabIndex = 4; this.controlVoltageNumericEditor.AfterChangeValue += new NationalInstruments.UI.AfterChangeNumericValueEventHandler(this.controlVoltageNumericEditor_AfterChangeValue); @@ -260,9 +260,9 @@ private void InitializeComponent() // // dSlider // - this.dSlider.CoercionInterval = 0.1; - this.dSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) - | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); + this.dSlider.CoercionInterval = 0.1D; + this.dSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) + | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); this.dSlider.Location = new System.Drawing.Point(121, 19); this.dSlider.Name = "dSlider"; this.dSlider.PointerColor = System.Drawing.SystemColors.HotTrack; @@ -271,9 +271,9 @@ private void InitializeComponent() // // iSlider // - this.iSlider.CoercionInterval = 0.1; - this.iSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) - | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); + this.iSlider.CoercionInterval = 0.1D; + this.iSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) + | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); this.iSlider.Location = new System.Drawing.Point(78, 19); this.iSlider.Name = "iSlider"; this.iSlider.PointerColor = System.Drawing.SystemColors.HotTrack; @@ -285,9 +285,9 @@ private void InitializeComponent() // this.pSlider.CaptionBackColor = System.Drawing.SystemColors.Control; this.pSlider.CaptionForeColor = System.Drawing.SystemColors.ControlText; - this.pSlider.CoercionInterval = 0.1; - this.pSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) - | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); + this.pSlider.CoercionInterval = 0.1D; + this.pSlider.InteractionMode = ((NationalInstruments.UI.LinearNumericPointerInteractionModes)(((NationalInstruments.UI.LinearNumericPointerInteractionModes.DragPointer | NationalInstruments.UI.LinearNumericPointerInteractionModes.SnapPointer) + | NationalInstruments.UI.LinearNumericPointerInteractionModes.EditRange))); this.pSlider.Location = new System.Drawing.Point(33, 19); this.pSlider.Name = "pSlider"; this.pSlider.OutOfRangeMode = NationalInstruments.UI.NumericOutOfRangeMode.CoerceToRange; @@ -318,7 +318,7 @@ private void InitializeComponent() // xAxis1 // this.xAxis1.Mode = NationalInstruments.UI.AxisMode.StripChart; - this.xAxis1.Range = new NationalInstruments.UI.Range(0, 100); + this.xAxis1.Range = new NationalInstruments.UI.Range(0D, 100D); // // yAxis1 // @@ -335,11 +335,11 @@ private void InitializeComponent() // // setpointNumericEdit // - this.setpointNumericEdit.CoercionInterval = 0.01; + this.setpointNumericEdit.CoercionInterval = 0.01D; this.setpointNumericEdit.FormatMode = NationalInstruments.UI.NumericFormatMode.CreateSimpleDoubleMode(3); this.setpointNumericEdit.Location = new System.Drawing.Point(257, 26); this.setpointNumericEdit.Name = "setpointNumericEdit"; - this.setpointNumericEdit.Range = new NationalInstruments.UI.Range(-100, 100); + this.setpointNumericEdit.Range = new NationalInstruments.UI.Range(-100D, 100D); this.setpointNumericEdit.Size = new System.Drawing.Size(59, 20); this.setpointNumericEdit.TabIndex = 11; this.setpointNumericEdit.AfterChangeValue += new NationalInstruments.UI.AfterChangeNumericValueEventHandler(this.setpointNumericEdit_AfterChangeValue); diff --git a/DecelerationLaserLock/MainForm.resx b/DecelerationLaserLock/MainForm.resx index 69c56499..25d918dd 100644 --- a/DecelerationLaserLock/MainForm.resx +++ b/DecelerationLaserLock/MainForm.resx @@ -112,12 +112,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 \ No newline at end of file diff --git a/EDMBlockHead/EDMBlockHead.csproj b/EDMBlockHead/EDMBlockHead.csproj index d3551fa2..eadaf816 100644 --- a/EDMBlockHead/EDMBlockHead.csproj +++ b/EDMBlockHead/EDMBlockHead.csproj @@ -1,275 +1,274 @@ - - - - Local - 9.0.21022 - 2.0 - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1} - Debug - AnyCPU - App.ico - - - EDMBlockHead - - - JScript - Grid - IE50 - false - WinExe - EDMBlockHead - OnBuildSuccess - EDMBlockHead.Runner - - - - - 3.5 - v4.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - bin\Decelerator\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - - - bin\EDMTestCrate\ - - - - - False - ..\..\..\..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll - - - - - System - - - 3.5 - - - System.Data - - - System.Drawing - - - - System.Windows.Forms - - - System.XML - - - Wolfram.NETLink - ..\DAQ\Wolfram.NETLink.dll - - - DAQ - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - EDMHardwareControl - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A} - EDMPhaseLock - - - ScanMaster - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - SharedCode - {BA0A0540-3F1C-483B-A180-CB78DF424F15} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - Code - - - Code - - - - Code - - - - Code - - - - Form - - - LiveViewer.cs - - - Form - - - True - True - Resources.resx - - - - - Code - - - Code - - - Code - - - Code - - - - - Designer - LiveViewer.cs - - - MainWindow.cs - Designer - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - - - - + + + + Local + 9.0.21022 + 2.0 + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1} + Debug + AnyCPU + App.ico + + + EDMBlockHead + + + JScript + Grid + IE50 + false + WinExe + EDMBlockHead + OnBuildSuccess + EDMBlockHead.Runner + + + + + 3.5 + v4.5 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + bin\Decelerator\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\Wavemeter\ + + + bin\EDMTestCrate\ + + + + + False + + + + + System + + + 3.5 + + + System.Data + + + System.Drawing + + + + System.Windows.Forms + + + System.XML + + + Wolfram.NETLink + ..\DAQ\Wolfram.NETLink.dll + + + DAQ + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + EDMHardwareControl + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A} + EDMPhaseLock + + + ScanMaster + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + SharedCode + {BA0A0540-3F1C-483B-A180-CB78DF424F15} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + + + Code + + + Code + + + + Code + + + + Code + + + + Form + + + LiveViewer.cs + + + Form + + + True + True + Resources.resx + + + + + Code + + + Code + + + Code + + + Code + + + + + Designer + LiveViewer.cs + + + MainWindow.cs + Designer + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + + + + \ No newline at end of file diff --git a/EDMHardwareControl/EDMHardwareControl.csproj b/EDMHardwareControl/EDMHardwareControl.csproj index a77d0622..90909a6c 100644 --- a/EDMHardwareControl/EDMHardwareControl.csproj +++ b/EDMHardwareControl/EDMHardwareControl.csproj @@ -1,229 +1,231 @@ - - - - Local - 9.0.21022 - 2.0 - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6} - Debug - AnyCPU - App.ico - - - EDMHardwareControl - - - JScript - Grid - IE50 - false - WinExe - EDMHardwareControl - OnBuildSuccess - EDMHardwareControl.Runner - - - - - false - 3.5 - 0 - v4.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - - - bin\EDMTestCrate\ - - - - {BA0A0540-3F1C-483B-A180-CB78DF424F15} - SharedCode - - - - - - - - System - - - 3.5 - - - System.Data - - - System.Drawing - - - - System.Windows.Forms - - - System.XML - - - DAQ - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - - Code - - - Code - - - Form - - - True - True - Resources.resx - - - - ControlWindow.cs - Designer - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - {2A38BE50-27E7-42F0-8663-CBCB1F25E13D} - 1 - 0 - 0 - aximp - False - - - {2A833923-9AA7-4C45-90AC-DA4F19DC24D1} - 1 - 0 - 0 - aximp - False - - - {2A38BE50-27E7-42F0-8663-CBCB1F25E13D} - 1 - 0 - 0 - tlbimp - False - - - {2A833923-9AA7-4C45-90AC-DA4F19DC24D1} - 1 - 0 - 0 - tlbimp - False - - - {00020430-0000-0000-C000-000000000046} - 2 - 0 - 0 - primary - False - - - - - - - - - + + + + Local + 9.0.21022 + 2.0 + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6} + Debug + AnyCPU + App.ico + + + EDMHardwareControl + + + JScript + Grid + IE50 + false + WinExe + EDMHardwareControl + OnBuildSuccess + EDMHardwareControl.Runner + + + + + false + 3.5 + 0 + v4.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\Wavemeter\ + + + bin\EDMTestCrate\ + + + + {BA0A0540-3F1C-483B-A180-CB78DF424F15} + SharedCode + + + + False + + + + + + System + + + 3.5 + + + System.Data + + + System.Drawing + + + + System.Windows.Forms + + + System.XML + + + DAQ + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + + + + Code + + + Code + + + Form + + + True + True + Resources.resx + + + + ControlWindow.cs + Designer + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + {2A38BE50-27E7-42F0-8663-CBCB1F25E13D} + 1 + 0 + 0 + aximp + False + + + {2A833923-9AA7-4C45-90AC-DA4F19DC24D1} + 1 + 0 + 0 + aximp + False + + + {2A38BE50-27E7-42F0-8663-CBCB1F25E13D} + 1 + 0 + 0 + tlbimp + False + + + {2A833923-9AA7-4C45-90AC-DA4F19DC24D1} + 1 + 0 + 0 + tlbimp + False + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + + + + + + + + + \ No newline at end of file diff --git a/EDMLaunchScripts/TransferCavityLock.bat b/EDMLaunchScripts/TransferCavityLock.bat index 658c9629..b8fa317f 100644 --- a/EDMLaunchScripts/TransferCavityLock.bat +++ b/EDMLaunchScripts/TransferCavityLock.bat @@ -1 +1 @@ -start ..\TransferCavityLock2012\bin\EDM\TransferCavityLock.exe +start ..\TransferCavityLock2012\bin\EDM\TransferCavityLock.exe diff --git a/EDMPhaseLock/EDMPhaseLock.csproj b/EDMPhaseLock/EDMPhaseLock.csproj index 972b4400..f7a4d599 100644 --- a/EDMPhaseLock/EDMPhaseLock.csproj +++ b/EDMPhaseLock/EDMPhaseLock.csproj @@ -1,168 +1,170 @@ - - - - Local - 9.0.21022 - 2.0 - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A} - Debug - AnyCPU - App.ico - - - EDMPhaseLock - - - JScript - Grid - IE50 - false - WinExe - EDMPhaseLock - OnBuildSuccess - EDMPhaseLock.Runner - - - - - 3.5 - v4.5 - - - - true - bin\Decelerator\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - 285212672 - 4096 - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - - - bin\EDMTestCrate\ - - - - - - - - - System - - - 3.5 - - - System.Data - - - System.Drawing - - - - System.Windows.Forms - - - System.XML - - - DAQ - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - - Code - - - Form - - - - - MainForm.cs - Designer - - - - - - - - - - - - + + + + Local + 9.0.21022 + 2.0 + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A} + Debug + AnyCPU + App.ico + + + EDMPhaseLock + + + JScript + Grid + IE50 + false + WinExe + EDMPhaseLock + OnBuildSuccess + EDMPhaseLock.Runner + + + + + 3.5 + v4.5 + + + + true + bin\Decelerator\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + 285212672 + 4096 + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\Wavemeter\ + + + bin\EDMTestCrate\ + + + + + False + + + + + + System + + + 3.5 + + + System.Data + + + System.Drawing + + + + System.Windows.Forms + + + System.XML + + + DAQ + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + + + + Code + + + Form + + + + + MainForm.cs + Designer + + + + + + + + + + + + \ No newline at end of file diff --git a/EDMScripts/AquireWithESwitch.py b/EDMScripts/AquireWithESwitch.py index 9c9bde97..e44f6ee1 100644 --- a/EDMScripts/AquireWithESwitch.py +++ b/EDMScripts/AquireWithESwitch.py @@ -1,28 +1,28 @@ -# MapLoop - asks ScanMaster to make a series of scans with one of the pg -# parameters incremented scan to scan - -from DAQ.Environment import * - -def aquireWithEFlip(numScans): - # setup - fileSystem = Environs.FileSystem - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_*.zip") - print("") - - # start looping - r = range(numScans) - for i in range(len(r)): - print "Scan Number: " + str(r[i]) - sm.AcquireAndWait(1) - scanPath = file + "_" + str(i) + ".zip" - sm.SaveAverageData(scanPath) - hc.SwitchEAndWait() - #raw_input("unplug the rf cable") - -def run_script(): - print "Use aquireWithEFlip(numScans)" - +# MapLoop - asks ScanMaster to make a series of scans with one of the pg +# parameters incremented scan to scan + +from DAQ.Environment import * + +def aquireWithEFlip(numScans): + # setup + fileSystem = Environs.FileSystem + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_*.zip") + print("") + + # start looping + r = range(numScans) + for i in range(len(r)): + print "Scan Number: " + str(r[i]) + sm.AcquireAndWait(1) + scanPath = file + "_" + str(i) + ".zip" + sm.SaveAverageData(scanPath) + hc.SwitchEAndWait() + #raw_input("unplug the rf cable") + +def run_script(): + print "Use aquireWithEFlip(numScans)" + diff --git a/EDMScripts/AquireWithESwitchPattern.py b/EDMScripts/AquireWithESwitchPattern.py index b5696e62..a0fceb68 100644 --- a/EDMScripts/AquireWithESwitchPattern.py +++ b/EDMScripts/AquireWithESwitchPattern.py @@ -1,35 +1,35 @@ -# MapLoop - asks ScanMaster to make a series of scans with one of the pg -# parameters incremented scan to scan - -from DAQ.Environment import * - -def aquireWithEFlipPattern(numScans, scansPerSwitch): - # setup - fileSystem = Environs.FileSystem - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_*.zip") - print("") - - pattern = - print(pattern) - - # start looping - r = range(numScans) - for i in range(len(r)): - print "Scan Number: " + str(r[i]) - sm.AcquireAndWait(1) - scanPath = file + "_" + str(i) + ".zip" - sm.SaveAverageData(scanPath) - if pattern[i] == 0: - print("No E Switch") - else: - print("Switching E") - hc.SwitchEAndWait() - #raw_input("unplug the rf cable") - -def run_script(): - print "Use aquireWithEFlipPattern(numScans, scansPerSwitch)" - +# MapLoop - asks ScanMaster to make a series of scans with one of the pg +# parameters incremented scan to scan + +from DAQ.Environment import * + +def aquireWithEFlipPattern(numScans, scansPerSwitch): + # setup + fileSystem = Environs.FileSystem + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_*.zip") + print("") + + pattern = + print(pattern) + + # start looping + r = range(numScans) + for i in range(len(r)): + print "Scan Number: " + str(r[i]) + sm.AcquireAndWait(1) + scanPath = file + "_" + str(i) + ".zip" + sm.SaveAverageData(scanPath) + if pattern[i] == 0: + print("No E Switch") + else: + print("Switching E") + hc.SwitchEAndWait() + #raw_input("unplug the rf cable") + +def run_script(): + print "Use aquireWithEFlipPattern(numScans, scansPerSwitch)" + diff --git a/EDMScripts/AquireWithESwitchandRamp.py b/EDMScripts/AquireWithESwitchandRamp.py index a4bf3aa8..91518182 100644 --- a/EDMScripts/AquireWithESwitchandRamp.py +++ b/EDMScripts/AquireWithESwitchandRamp.py @@ -1,34 +1,34 @@ -# MapLoop - asks ScanMaster to make a series of scans with one of the pg -# parameters incremented scan to scan - -from DAQ.Environment import * - -def aquireWithEFlip(numScans, start, stop, step): - # setup - fileSystem = Environs.FileSystem - # loop over voltages - l = range(int(10*start), int(10*stop), int(10*step)) - for j in range(len(l)): - print "E fields at +/- " + str(float(l[j])/10) + " KV" - hc.SetCPlusVoltage(float(l[j])/10) - hc.SetCMinusVoltage(float(l[j])/10) - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_*.zip") - print("") - - # start looping - r = range(numScans) - for i in range(len(r)): - print "Scan Number: " + str(r[i]) - sm.AcquireAndWait(5) - scanPath = file + "_" + str(i) + ".zip" - sm.SaveAverageData(scanPath) - print "Switching E fields" - hc.SwitchEAndWait() - -def run_script(): - print "Use aquireWithEFlip(numScans, start, stop, step). voltages in kV, no inc less than 0.l" - +# MapLoop - asks ScanMaster to make a series of scans with one of the pg +# parameters incremented scan to scan + +from DAQ.Environment import * + +def aquireWithEFlip(numScans, start, stop, step): + # setup + fileSystem = Environs.FileSystem + # loop over voltages + l = range(int(10*start), int(10*stop), int(10*step)) + for j in range(len(l)): + print "E fields at +/- " + str(float(l[j])/10) + " KV" + hc.SetCPlusVoltage(float(l[j])/10) + hc.SetCMinusVoltage(float(l[j])/10) + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_*.zip") + print("") + + # start looping + r = range(numScans) + for i in range(len(r)): + print "Scan Number: " + str(r[i]) + sm.AcquireAndWait(5) + scanPath = file + "_" + str(i) + ".zip" + sm.SaveAverageData(scanPath) + print "Switching E fields" + hc.SwitchEAndWait() + +def run_script(): + print "Use aquireWithEFlip(numScans, start, stop, step). voltages in kV, no inc less than 0.l" + diff --git a/EDMScripts/AquireWithWait.py b/EDMScripts/AquireWithWait.py index 3e9d694c..862dc446 100644 --- a/EDMScripts/AquireWithWait.py +++ b/EDMScripts/AquireWithWait.py @@ -1,27 +1,27 @@ -# MapLoop - asks ScanMaster to make a series of scans with one of the pg -# parameters incremented scan to scan - -from DAQ.Environment import * - -def aquireWithEFlip(numScans): - # setup - fileSystem = Environs.FileSystem - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_*.zip") - print("") - - # start looping - r = range(numScans) - for i in range(len(r)): - print "Scan Number: " + str(r[i]) - #raw_input("unplug the rf cable") - sm.AcquireAndWait(1) - scanPath = file + "_" + str(i) + ".zip" - sm.SaveAverageData(scanPath) - -def run_script(): - print "Use aquireWithEFlip(numScans)" - +# MapLoop - asks ScanMaster to make a series of scans with one of the pg +# parameters incremented scan to scan + +from DAQ.Environment import * + +def aquireWithEFlip(numScans): + # setup + fileSystem = Environs.FileSystem + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_*.zip") + print("") + + # start looping + r = range(numScans) + for i in range(len(r)): + print "Scan Number: " + str(r[i]) + #raw_input("unplug the rf cable") + sm.AcquireAndWait(1) + scanPath = file + "_" + str(i) + ".zip" + sm.SaveAverageData(scanPath) + +def run_script(): + print "Use aquireWithEFlip(numScans)" + diff --git a/EDMScripts/ChannelResponseLoop.py b/EDMScripts/ChannelResponseLoop.py index 21fa31e6..b6fc3a3e 100644 --- a/EDMScripts/ChannelResponseLoop.py +++ b/EDMScripts/ChannelResponseLoop.py @@ -1,498 +1,498 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - hc.UpdateVCOFraction() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - # printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState, blockIndex): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") - - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B.DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF1A = 0 - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF2A = 0 - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - deltaLF1 = -1 - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - #deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - deltaLF2 = -hc.VCOConvFrac * deltaLF1 - #deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - print "probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre) + " MHz" - print "probe AOM Frequency: " + str(hc.PumpAOMFrequencyCentre) + " MHz" - print "pump + probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre + hc.PumpAOMFrequencyCentre) + " MHz" - # print "Total Frequency scanned: " + str(-deltaLF1) + " MHz" - - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 10000 - dbValueList = [] - lf1dbdbValueList = [] - I2VValueList = [] - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - bh.AcquireAndWait() - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - I2VValue = hc.FLPZTVoltage - - lf1dbdbValueList.append(lf1dbdbValue) - print "lf1dbdb Values: " + str(lf1dbdbValueList).strip('[]') - - I2VValueList.append(I2VValue) - print "I2 Voltage Values: " + str(I2VValueList).strip('[]') - - updateLocksNL(bState, blockIndex) - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - #System.Threading.Thread.Sleep(15000) - - - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - # do things that need periodically doing - # if ((blockIndex % kTargetRotationPeriod) == 0): - # print("Rotating target.") - # hc.StepTarget(10) - - pmtChannelValues = bh.DBlock.ChannelValues[0] - dbValue = pmtChannelValues.GetValue(("DB",)) - - dbValueList.append(dbValue) - if (len(dbValueList) == 4): - del dbValueList[0] - print "DB values for last 3 blocks " + str(dbValueList).strip('[]') - runningdbMean =float(sum(dbValueList)) / len(dbValueList) - if ( runningdbMean < 1 and nightBool is "Y" ): - hc.EnableEField( False ) - hc.SetArgonShutter( True ) - break - - if (dbValue < 10): - print("Dodgy spot target rotation.") - for i in range(2): - hc.StepTarget(2) - System.Threading.Thread.Sleep(500) - if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): - print("Recalibrating leakage monitors.") - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + hc.UpdateVCOFraction() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + # printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState, blockIndex): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") + + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B.DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF1A = 0 + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF2A = 0 + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + deltaLF1 = -1 + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + #deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + deltaLF2 = -hc.VCOConvFrac * deltaLF1 + #deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + print "probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre) + " MHz" + print "probe AOM Frequency: " + str(hc.PumpAOMFrequencyCentre) + " MHz" + print "pump + probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre + hc.PumpAOMFrequencyCentre) + " MHz" + # print "Total Frequency scanned: " + str(-deltaLF1) + " MHz" + + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 10000 + dbValueList = [] + lf1dbdbValueList = [] + I2VValueList = [] + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + bh.AcquireAndWait() + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + I2VValue = hc.FLPZTVoltage + + lf1dbdbValueList.append(lf1dbdbValue) + print "lf1dbdb Values: " + str(lf1dbdbValueList).strip('[]') + + I2VValueList.append(I2VValue) + print "I2 Voltage Values: " + str(I2VValueList).strip('[]') + + updateLocksNL(bState, blockIndex) + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + #System.Threading.Thread.Sleep(15000) + + + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + # do things that need periodically doing + # if ((blockIndex % kTargetRotationPeriod) == 0): + # print("Rotating target.") + # hc.StepTarget(10) + + pmtChannelValues = bh.DBlock.ChannelValues[0] + dbValue = pmtChannelValues.GetValue(("DB",)) + + dbValueList.append(dbValue) + if (len(dbValueList) == 4): + del dbValueList[0] + print "DB values for last 3 blocks " + str(dbValueList).strip('[]') + runningdbMean =float(sum(dbValueList)) / len(dbValueList) + if ( runningdbMean < 1 and nightBool is "Y" ): + hc.EnableEField( False ) + hc.SetArgonShutter( True ) + break + + if (dbValue < 10): + print("Dodgy spot target rotation.") + for i in range(2): + hc.StepTarget(2) + System.Threading.Thread.Sleep(500) + if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): + print("Recalibrating leakage monitors.") + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/EDMLoopF1.py b/EDMScripts/EDMLoopF1.py index f4a9b754..a0f3b998 100644 --- a/EDMScripts/EDMLoopF1.py +++ b/EDMScripts/EDMLoopF1.py @@ -1,523 +1,523 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - #hc.UpdateVCOFraction() - hc.CheckPiMonitor() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - # printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[8] - rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] - rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") - rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) - rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) - rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) - rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) - rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) - rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B/DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) - print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" - print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = (1.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF1A = 0 - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - if (newRF1A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF1A to 4.5 V." - newRF1A = 4.5 - hc.SetRF1AttCentre( newRF1A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = (1.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF2A = 0 - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - if (newRF2A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF2A to 4.5 V." - newRF2A = 4.5 - hc.SetRF2AttCentre( newRF2A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - hc.SetRF2AttCentre( newRF2A ) - - # RFF locks - deltaRF1F = (1.0/2.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = (1.0/2.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - deltaLF1 = -2.5* ( lf1dbdbValue) - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - #deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue - #deltaLF2 = hc.VCOConvFrac * deltaLF1 - #deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) - deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableGreenSynth( False ) - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - hc.EnableGreenSynth( True ) - print("leakage monitors calibrated") - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 10000 - dbValueList = [] - Emag1List =[] - Emini1List=[] - Emini2List=[] - Emini3List=[] - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - bh.AcquireAndWait() - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - updateLocksNL(bState) - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - pmtChannelValues = bh.DBlock.ChannelValues[0] - magChannelValues = bh.DBlock.ChannelValues[2] - mini1ChannelValues = bh.DBlock.ChannelValues[9] - mini2ChannelValues = bh.DBlock.ChannelValues[10] - mini3ChannelValues = bh.DBlock.ChannelValues[11] - dbValue = pmtChannelValues.GetValue(("DB",)) - magEValue = magChannelValues.GetValue(("E",)) - mini1EValue = mini1ChannelValues.GetValue(("E",)) - mini2EValue = mini2ChannelValues.GetValue(("E",)) - mini3EValue = mini3ChannelValues.GetValue(("E",)) - - - # some code to stop EDMLoop if the laser unlocks. - # This averages the last 3 db values and stops the loop if the average is below 1 - - dbValueList.append(dbValue) - if (len(dbValueList) == 4): - del dbValueList[0] - print "DB values for last 3 blocks " + str(dbValueList).strip('[]') - runningdbMean =float(sum(dbValueList)) / len(dbValueList) - if ( runningdbMean < 1 and nightBool is "Y" ): - hc.EnableEField( False ) - hc.SetArgonShutter( True ) - break - - Emag1List.append(magEValue) - if (len(Emag1List) == 11): - del Emag1List[0] - print "E_{Mag} for the last 10 blocks " + str(Emag1List).strip('[]') - runningEmag1Mean =float(sum(Emag1List)) / len(Emag1List) - print "Average E_{Mag} for the last 10 blocks " + str(runningEmag1Mean) - - - if (dbValue < 8): - print("Dodgy spot target rotation.") - for i in range(3): - hc.StepTarget(2) - System.Threading.Thread.Sleep(500) - if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): - print("Recalibrating leakage monitors.") - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + #hc.UpdateVCOFraction() + hc.CheckPiMonitor() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + # printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[8] + rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] + rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") + rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) + rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) + rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) + rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) + rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) + rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B/DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) + print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" + print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = (1.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF1A = 0 + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + if (newRF1A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF1A to 4.5 V." + newRF1A = 4.5 + hc.SetRF1AttCentre( newRF1A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = (1.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF2A = 0 + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + if (newRF2A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF2A to 4.5 V." + newRF2A = 4.5 + hc.SetRF2AttCentre( newRF2A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + hc.SetRF2AttCentre( newRF2A ) + + # RFF locks + deltaRF1F = (1.0/2.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = (1.0/2.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + deltaLF1 = -2.5* ( lf1dbdbValue) + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + #deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue + #deltaLF2 = hc.VCOConvFrac * deltaLF1 + #deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) + deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableGreenSynth( False ) + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + hc.EnableGreenSynth( True ) + print("leakage monitors calibrated") + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 10000 + dbValueList = [] + Emag1List =[] + Emini1List=[] + Emini2List=[] + Emini3List=[] + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + bh.AcquireAndWait() + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + updateLocksNL(bState) + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + pmtChannelValues = bh.DBlock.ChannelValues[0] + magChannelValues = bh.DBlock.ChannelValues[2] + mini1ChannelValues = bh.DBlock.ChannelValues[9] + mini2ChannelValues = bh.DBlock.ChannelValues[10] + mini3ChannelValues = bh.DBlock.ChannelValues[11] + dbValue = pmtChannelValues.GetValue(("DB",)) + magEValue = magChannelValues.GetValue(("E",)) + mini1EValue = mini1ChannelValues.GetValue(("E",)) + mini2EValue = mini2ChannelValues.GetValue(("E",)) + mini3EValue = mini3ChannelValues.GetValue(("E",)) + + + # some code to stop EDMLoop if the laser unlocks. + # This averages the last 3 db values and stops the loop if the average is below 1 + + dbValueList.append(dbValue) + if (len(dbValueList) == 4): + del dbValueList[0] + print "DB values for last 3 blocks " + str(dbValueList).strip('[]') + runningdbMean =float(sum(dbValueList)) / len(dbValueList) + if ( runningdbMean < 1 and nightBool is "Y" ): + hc.EnableEField( False ) + hc.SetArgonShutter( True ) + break + + Emag1List.append(magEValue) + if (len(Emag1List) == 11): + del Emag1List[0] + print "E_{Mag} for the last 10 blocks " + str(Emag1List).strip('[]') + runningEmag1Mean =float(sum(Emag1List)) / len(Emag1List) + print "Average E_{Mag} for the last 10 blocks " + str(runningEmag1Mean) + + + if (dbValue < 8): + print("Dodgy spot target rotation.") + for i in range(3): + hc.StepTarget(2) + System.Threading.Thread.Sleep(500) + if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): + print("Recalibrating leakage monitors.") + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/EDMLoopNoLocks.py b/EDMScripts/EDMLoopNoLocks.py index 839134f3..6bcf40f3 100644 --- a/EDMScripts/EDMLoopNoLocks.py +++ b/EDMScripts/EDMLoopNoLocks.py @@ -1,456 +1,456 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - hc.UpdateVCOFraction() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[8] - rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] - rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") - rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) - rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) - rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) - rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) - rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) - rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B/DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) - print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" - print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (3.6/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF1A = 0 - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - if (newRF1A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF1A to 4.5 V." - newRF1A = 4.5 - hc.SetRF1AttCentre( newRF1A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (3.6/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF2A = 0 - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - if (newRF2A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF2A to 4.5 V." - newRF2A = 4.5 - hc.SetRF2AttCentre( newRF2A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - hc.SetRF2AttCentre( newRF2A ) - - # RFF locks - deltaRF1F = - (5.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (5.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - deltaLF1 = -2.5* ( lf1dbdbValue) - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - #deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue - deltaLF2 = hc.VCOConvFrac * deltaLF1 - deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) - #deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 10000 - hc.SetPatternTTL(False) - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - hc.SetPatternTTL(True) - bh.AcquireAndWait() - hc.SetPatternTTL(False) - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - #updateLocksNL(bState) - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - for i in range(4): - hc.StepTarget(20) - System.Threading.Thread.Sleep(500) - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + hc.UpdateVCOFraction() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[8] + rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] + rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") + rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) + rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) + rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) + rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) + rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) + rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B/DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) + print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" + print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (3.6/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF1A = 0 + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + if (newRF1A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF1A to 4.5 V." + newRF1A = 4.5 + hc.SetRF1AttCentre( newRF1A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (3.6/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF2A = 0 + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + if (newRF2A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF2A to 4.5 V." + newRF2A = 4.5 + hc.SetRF2AttCentre( newRF2A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + hc.SetRF2AttCentre( newRF2A ) + + # RFF locks + deltaRF1F = - (5.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (5.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + deltaLF1 = -2.5* ( lf1dbdbValue) + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + #deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue + deltaLF2 = hc.VCOConvFrac * deltaLF1 + deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) + #deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 10000 + hc.SetPatternTTL(False) + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + hc.SetPatternTTL(True) + bh.AcquireAndWait() + hc.SetPatternTTL(False) + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + #updateLocksNL(bState) + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + for i in range(4): + hc.StepTarget(20) + System.Threading.Thread.Sleep(500) + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/EDMLoopNoNorm.py b/EDMScripts/EDMLoopNoNorm.py index a105816f..29cdf803 100644 --- a/EDMScripts/EDMLoopNoNorm.py +++ b/EDMScripts/EDMLoopNoNorm.py @@ -1,522 +1,522 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - hc.UpdateVCOFraction() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - # printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[0] - rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] - rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") - rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) - rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) - rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) - rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) - rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) - rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B/DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) - print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" - print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (3.6/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF1A = 0 - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - if (newRF1A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF1A to 4.5 V." - newRF1A = 4.5 - hc.SetRF1AttCentre( newRF1A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (3.6/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF2A = 0 - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - if (newRF2A == 4.9): - newSynthAmp = hc.GreenSynthOnAmplitude + 1 - print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." - print "Setting RF2A to 4.5 V." - newRF2A = 4.5 - hc.SetRF2AttCentre( newRF2A ) - hc.SetGreenSynthAmp(newSynthAmp) - else: - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - hc.SetRF2AttCentre( newRF2A ) - - # RFF locks - deltaRF1F = - (5.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (5.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - deltaLF1 = -2.5* ( lf1dbdbValue) - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - #deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue - deltaLF2 = hc.VCOConvFrac * deltaLF1 - deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) - #deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableGreenSynth( False ) - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - hc.EnableGreenSynth( True ) - print("leakage monitors calibrated") - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 10000 - dbValueList = [] - Emag1List =[] - Emini1List=[] - Emini2List=[] - Emini3List=[] - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - bh.AcquireAndWait() - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - updateLocksNL(bState) - # randomise Ramsey phase - scramblerV = 0.97156 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - pmtChannelValues = bh.DBlock.ChannelValues[0] - magChannelValues = bh.DBlock.ChannelValues[2] - mini1ChannelValues = bh.DBlock.ChannelValues[9] - mini2ChannelValues = bh.DBlock.ChannelValues[10] - mini3ChannelValues = bh.DBlock.ChannelValues[11] - dbValue = pmtChannelValues.GetValue(("DB",)) - magEValue = magChannelValues.GetValue(("E",)) - mini1EValue = mini1ChannelValues.GetValue(("E",)) - mini2EValue = mini2ChannelValues.GetValue(("E",)) - mini3EValue = mini3ChannelValues.GetValue(("E",)) - - - # some code to stop EDMLoop if the laser unlocks. - # This averages the last 3 db values and stops the loop if the average is below 1 - - dbValueList.append(dbValue) - if (len(dbValueList) == 4): - del dbValueList[0] - print "DB values for last 3 blocks " + str(dbValueList).strip('[]') - runningdbMean =float(sum(dbValueList)) / len(dbValueList) - if ( runningdbMean < 1 and nightBool is "Y" ): - hc.EnableEField( False ) - hc.SetArgonShutter( True ) - break - - Emag1List.append(magEValue) - if (len(Emag1List) == 11): - del Emag1List[0] - print "E_{Mag} for the last 10 blocks " + str(Emag1List).strip('[]') - runningEmag1Mean =float(sum(Emag1List)) / len(Emag1List) - print "Average E_{Mag} for the last 10 blocks " + str(runningEmag1Mean) - - - if (dbValue < 19): - print("Dodgy spot target rotation.") - for i in range(4): - hc.StepTarget(20) - System.Threading.Thread.Sleep(500) - if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): - print("Recalibrating leakage monitors.") - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + hc.UpdateVCOFraction() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + # printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[0] + rf1ampReftChannelValues = bh.DBlock.ChannelValues[6] + rf2ampReftChannelValues = bh.DBlock.ChannelValues[7] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = pmtChannelValues.GetSpecialValue("LF2DBDB") + rf1ampRefSig = rf1ampReftChannelValues.GetValue(("SIG",)) + rf2ampRefSig = rf2ampReftChannelValues.GetValue(("SIG",)) + rf1ampRefE = rf1ampReftChannelValues.GetValue(("E",)) + rf2ampRefE = rf2ampReftChannelValues.GetValue(("E",)) + rf1ampRefEErr = rf1ampReftChannelValues.GetError(("E",)) + rf2ampRefEErr = rf2ampReftChannelValues.GetError(("E",)) + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B/DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + print "RF1 Reflected: " + str(rf1ampRefSig) + " RF2 Reflected: " + str(rf2ampRefSig) + print "{E}_RF1 Reflected: {" + str(rf1ampRefE) + " , " + str(rf1ampRefEErr) + " }" + print "{E}_RF2 Reflected: {" + str(rf2ampRefE) + " , " + str(rf2ampRefEErr) + " }" + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (3.6/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF1A = 0 + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + if (newRF1A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF1A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF1A to 4.5 V." + newRF1A = 4.5 + hc.SetRF1AttCentre( newRF1A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (3.6/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF2A = 0 + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + if (newRF2A == 4.9): + newSynthAmp = hc.GreenSynthOnAmplitude + 1 + print "RF2A pinned, increasing synth to " + str(newSynthAmp) + " dBm." + print "Setting RF2A to 4.5 V." + newRF2A = 4.5 + hc.SetRF2AttCentre( newRF2A ) + hc.SetGreenSynthAmp(newSynthAmp) + else: + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + hc.SetRF2AttCentre( newRF2A ) + + # RFF locks + deltaRF1F = - (5.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 1.1 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (5.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 1.1 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + deltaLF1 = -2.5* ( lf1dbdbValue) + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + #deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + deltaLF2 = hc.VCOConvFrac * deltaLF1 - 2.5 * lf2dbdbValue + deltaLF2 = hc.VCOConvFrac * deltaLF1 + deltaLF2 = windowValue(deltaLF2, -0.1, 0.1) + #deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableGreenSynth( False ) + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + hc.EnableGreenSynth( True ) + print("leakage monitors calibrated") + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 10000 + dbValueList = [] + Emag1List =[] + Emini1List=[] + Emini2List=[] + Emini3List=[] + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + bh.AcquireAndWait() + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + updateLocksNL(bState) + # randomise Ramsey phase + scramblerV = 0.97156 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + pmtChannelValues = bh.DBlock.ChannelValues[0] + magChannelValues = bh.DBlock.ChannelValues[2] + mini1ChannelValues = bh.DBlock.ChannelValues[9] + mini2ChannelValues = bh.DBlock.ChannelValues[10] + mini3ChannelValues = bh.DBlock.ChannelValues[11] + dbValue = pmtChannelValues.GetValue(("DB",)) + magEValue = magChannelValues.GetValue(("E",)) + mini1EValue = mini1ChannelValues.GetValue(("E",)) + mini2EValue = mini2ChannelValues.GetValue(("E",)) + mini3EValue = mini3ChannelValues.GetValue(("E",)) + + + # some code to stop EDMLoop if the laser unlocks. + # This averages the last 3 db values and stops the loop if the average is below 1 + + dbValueList.append(dbValue) + if (len(dbValueList) == 4): + del dbValueList[0] + print "DB values for last 3 blocks " + str(dbValueList).strip('[]') + runningdbMean =float(sum(dbValueList)) / len(dbValueList) + if ( runningdbMean < 1 and nightBool is "Y" ): + hc.EnableEField( False ) + hc.SetArgonShutter( True ) + break + + Emag1List.append(magEValue) + if (len(Emag1List) == 11): + del Emag1List[0] + print "E_{Mag} for the last 10 blocks " + str(Emag1List).strip('[]') + runningEmag1Mean =float(sum(Emag1List)) / len(Emag1List) + print "Average E_{Mag} for the last 10 blocks " + str(runningEmag1Mean) + + + if (dbValue < 19): + print("Dodgy spot target rotation.") + for i in range(4): + hc.StepTarget(20) + System.Threading.Thread.Sleep(500) + if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): + print("Recalibrating leakage monitors.") + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/LF2ChannelResponseLoop.py b/EDMScripts/LF2ChannelResponseLoop.py index e4721f5e..96f5cedd 100644 --- a/EDMScripts/LF2ChannelResponseLoop.py +++ b/EDMScripts/LF2ChannelResponseLoop.py @@ -1,499 +1,499 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - hc.UpdateVCOFraction() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - # printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState, blockIndex): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") - - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B.DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF1A = 0 - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - #deltaRF2A = 0 - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - #deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - deltaLF1 = 0 - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - #deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - deltaLF2 = -0.25 - #deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - print "probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre) + " MHz" - print "probe AOM Frequency: " + str(hc.PumpAOMFrequencyCentre) + " MHz" - print "pump + probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre + hc.PumpAOMFrequencyCentre) + " MHz" - # print "Total Frequency scanned: " + str(-deltaLF1) + " MHz" - - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 9 - dbValueList = [] - lf2dbdbValueList = [] - pumpVValueList = [] - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - bh.AcquireAndWait() - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - #lf2dbdbValue = bh.analysis.LF1DBDB - lf2dbdbValue = [normedpmtChannelValues.GetSpecialValue("LF2DBDB"),normedpmtChannelValues.GetSpecialError("LF2DBDB")] - pumpVValue = hc.PumpAOMFrequencyCentre - - lf2dbdbValueList.append(lf2dbdbValue) - print "lf2dbdb Values: " + str(lf2dbdbValueList).strip('[]') - - pumpVValueList.append(pumpVValue) - print "Pump Voltage Values: " + str(pumpVValueList).strip('[]') - - updateLocksNL(bState, blockIndex) - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - #System.Threading.Thread.Sleep(15000) - - - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - # do things that need periodically doing - # if ((blockIndex % kTargetRotationPeriod) == 0): - # print("Rotating target.") - # hc.StepTarget(10) - - pmtChannelValues = bh.DBlock.ChannelValues[0] - dbValue = pmtChannelValues.GetValue(("DB",)) - - dbValueList.append(dbValue) - if (len(dbValueList) == 4): - del dbValueList[0] - print "DB values for last 3 blocks " + str(dbValueList).strip('[]') - runningdbMean =float(sum(dbValueList)) / len(dbValueList) - if ( runningdbMean < 1 and nightBool is "Y" ): - hc.EnableEField( False ) - hc.SetArgonShutter( True ) - break - - if (dbValue < 10): - print("Dodgy spot target rotation.") - for i in range(2): - hc.StepTarget(2) - System.Threading.Thread.Sleep(500) - if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): - print("Recalibrating leakage monitors.") - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + hc.UpdateVCOFraction() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + # printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState, blockIndex): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") + + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B.DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF1A = 0 + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + #deltaRF2A = 0 + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + #deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + deltaLF1 = 0 + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + #deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + deltaLF2 = -0.25 + #deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + print "probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre) + " MHz" + print "probe AOM Frequency: " + str(hc.PumpAOMFrequencyCentre) + " MHz" + print "pump + probe AOM Frequency: " + str(hc.I2LockAOMFrequencyCentre + hc.PumpAOMFrequencyCentre) + " MHz" + # print "Total Frequency scanned: " + str(-deltaLF1) + " MHz" + + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 9 + dbValueList = [] + lf2dbdbValueList = [] + pumpVValueList = [] + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + bh.AcquireAndWait() + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + #lf2dbdbValue = bh.analysis.LF1DBDB + lf2dbdbValue = [normedpmtChannelValues.GetSpecialValue("LF2DBDB"),normedpmtChannelValues.GetSpecialError("LF2DBDB")] + pumpVValue = hc.PumpAOMFrequencyCentre + + lf2dbdbValueList.append(lf2dbdbValue) + print "lf2dbdb Values: " + str(lf2dbdbValueList).strip('[]') + + pumpVValueList.append(pumpVValue) + print "Pump Voltage Values: " + str(pumpVValueList).strip('[]') + + updateLocksNL(bState, blockIndex) + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + #System.Threading.Thread.Sleep(15000) + + + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + # do things that need periodically doing + # if ((blockIndex % kTargetRotationPeriod) == 0): + # print("Rotating target.") + # hc.StepTarget(10) + + pmtChannelValues = bh.DBlock.ChannelValues[0] + dbValue = pmtChannelValues.GetValue(("DB",)) + + dbValueList.append(dbValue) + if (len(dbValueList) == 4): + del dbValueList[0] + print "DB values for last 3 blocks " + str(dbValueList).strip('[]') + runningdbMean =float(sum(dbValueList)) / len(dbValueList) + if ( runningdbMean < 1 and nightBool is "Y" ): + hc.EnableEField( False ) + hc.SetArgonShutter( True ) + break + + if (dbValue < 10): + print("Dodgy spot target rotation.") + for i in range(2): + hc.StepTarget(2) + System.Threading.Thread.Sleep(500) + if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): + print("Recalibrating leakage monitors.") + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/ManualStateSelector.py b/EDMScripts/ManualStateSelector.py index 0b5e6ce7..3d7b89e9 100644 --- a/EDMScripts/ManualStateSelector.py +++ b/EDMScripts/ManualStateSelector.py @@ -1,14 +1,14 @@ -from System import Random - -rand = Random() - -def randomBool(): - if rand.Next(0,2) < 1: - return "True" - else: - return "False" - -def run_script(): - print("(" + randomBool() + ", " + randomBool() + ", " + randomBool() + ")" ) - - +from System import Random + +rand = Random() + +def randomBool(): + if rand.Next(0,2) < 1: + return "True" + else: + return "False" + +def run_script(): + print("(" + randomBool() + ", " + randomBool() + ", " + randomBool() + ")" ) + + diff --git a/EDMScripts/MapRF1CentreLoop.py b/EDMScripts/MapRF1CentreLoop.py index dfdc82bc..0219c122 100644 --- a/EDMScripts/MapRF1CentreLoop.py +++ b/EDMScripts/MapRF1CentreLoop.py @@ -1,28 +1,28 @@ -# MapLoop - asks ScanMaster to make a series of scans with one of the pg -# parameters incremented scan to scan - -from DAQ.Environment import * - -def mapLoop(start, end, step, numScans): - # setup - fileSystem = Environs.FileSystem - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_*.zip") - print("") - # start looping - r = range(start, end, step) - for i in range(len(r)): - print "pg:rf1CentreTime -> " + str(r[i]) - print "pg:rf1BlankingCentreTime -> " + str(r[i]) - sm.AdjustProfileParameter("pg", "rf1CentreTime", str(r[i]), False) - sm.AdjustProfileParameter("pg", "rf1BlankingCentreTime", str(r[i]), False) - sm.AcquireAndWait(numScans) - scanPath = file + "_" + str(i) + ".zip" - sm.SaveAverageData(scanPath) - -def run_script(): - print "Use mapLoop(start, end, step, numScans)" - +# MapLoop - asks ScanMaster to make a series of scans with one of the pg +# parameters incremented scan to scan + +from DAQ.Environment import * + +def mapLoop(start, end, step, numScans): + # setup + fileSystem = Environs.FileSystem + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_*.zip") + print("") + # start looping + r = range(start, end, step) + for i in range(len(r)): + print "pg:rf1CentreTime -> " + str(r[i]) + print "pg:rf1BlankingCentreTime -> " + str(r[i]) + sm.AdjustProfileParameter("pg", "rf1CentreTime", str(r[i]), False) + sm.AdjustProfileParameter("pg", "rf1BlankingCentreTime", str(r[i]), False) + sm.AcquireAndWait(numScans) + scanPath = file + "_" + str(i) + ".zip" + sm.SaveAverageData(scanPath) + +def run_script(): + print "Use mapLoop(start, end, step, numScans)" + diff --git a/EDMScripts/MonitorRFDischargesScanSynthAmp.py b/EDMScripts/MonitorRFDischargesScanSynthAmp.py index 2aeb22c7..1bf1bd9c 100644 --- a/EDMScripts/MonitorRFDischargesScanSynthAmp.py +++ b/EDMScripts/MonitorRFDischargesScanSynthAmp.py @@ -1,36 +1,36 @@ -# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes -# n - -from DAQ.Environment import * - -def scanRF(LowestAmp, HighestAmp, step, numScans): - # setup - AmpList = [] - fileSystem = Environs.FileSystem - file = \ - fileSystem.GetDataDirectory(\ - fileSystem.Paths["scanMasterDataPath"])\ - + fileSystem.GenerateNextDataFileName() - print("Saving as " + file + "_" + "MeasuredRF1Amp" + "*.zip") - print("") - # start looping - r = range(int(10*LowestAmp), int(10*HighestAmp), int(10*step)) - for i in range(len(r)): - print "hc:rf1 Amplitude -> " + str(float(r[i])/10) - hc.SetGreenSynthAmp(float(r[i])/10) - # hc.GreenSynthOnAmplitude = double(r[i]/10) - hc.EnableGreenSynth( False ) - hc.EnableGreenSynth( True ) - hc.UpdateRFPowerMonitor() - rfAmpMeasured = hc.RF1PowerCentre - hc.StepTarget(2) - System.Threading.Thread.Sleep(500) - sm.AcquireAndWait(numScans) - scanPath = file + "_" + str(i) + "_" + str(rfAmpMeasured) + ".zip" - sm.SaveData(scanPath) - AmpList.append(str(rfAmpMeasured)) - print "List of Measured Amplitudes =" + str(AmpList).strip('[]') - -def run_script(): - print "Use scanRF(LowestAmp, HighestAmp, step, numScans)" - +# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes +# n + +from DAQ.Environment import * + +def scanRF(LowestAmp, HighestAmp, step, numScans): + # setup + AmpList = [] + fileSystem = Environs.FileSystem + file = \ + fileSystem.GetDataDirectory(\ + fileSystem.Paths["scanMasterDataPath"])\ + + fileSystem.GenerateNextDataFileName() + print("Saving as " + file + "_" + "MeasuredRF1Amp" + "*.zip") + print("") + # start looping + r = range(int(10*LowestAmp), int(10*HighestAmp), int(10*step)) + for i in range(len(r)): + print "hc:rf1 Amplitude -> " + str(float(r[i])/10) + hc.SetGreenSynthAmp(float(r[i])/10) + # hc.GreenSynthOnAmplitude = double(r[i]/10) + hc.EnableGreenSynth( False ) + hc.EnableGreenSynth( True ) + hc.UpdateRFPowerMonitor() + rfAmpMeasured = hc.RF1PowerCentre + hc.StepTarget(2) + System.Threading.Thread.Sleep(500) + sm.AcquireAndWait(numScans) + scanPath = file + "_" + str(i) + "_" + str(rfAmpMeasured) + ".zip" + sm.SaveData(scanPath) + AmpList.append(str(rfAmpMeasured)) + print "List of Measured Amplitudes =" + str(AmpList).strip('[]') + +def run_script(): + print "Use scanRF(LowestAmp, HighestAmp, step, numScans)" + diff --git a/EDMScripts/RF1AChannelResponseLoop.py b/EDMScripts/RF1AChannelResponseLoop.py index c0930349..cc9788aa 100644 --- a/EDMScripts/RF1AChannelResponseLoop.py +++ b/EDMScripts/RF1AChannelResponseLoop.py @@ -1,491 +1,491 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - -def saveBlockConfig(path, config): - fs = FileStream(path, FileMode.Create) - s = XmlSerializer(BlockConfig) - s.Serialize(fs,config) - fs.Close() - -def loadBlockConfig(path): - fs = FileStream(path, FileMode.Open) - s = XmlSerializer(BlockConfig) - bc = s.Deserialize(fs) - fs.Close() - return bc - -def writeLatestBlockNotificationFile(cluster, blockIndex): - fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) - sw = StreamWriter(fs) - sw.WriteLine(cluster + "\t" + str(blockIndex)) - sw.Close() - fs.Close() - -def checkYAGAndFix(): - interlockFailed = hc.YAGInterlockFailed; - if (interlockFailed): - bh.StopPattern(); - bh.StartPattern(); - -def printWaveformCode(bc, name): - print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): - fileSystem = Environs.FileSystem - print("Measuring parameters ...") - bh.StopPattern() - hc.UpdateRFPowerMonitor() - hc.UpdateRFFrequencyMonitor() - bh.StartPattern() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - hc.UpdateI2AOMFreqMonitor() - hc.UpdatePumpAOMFreqMonitor() - hc.UpdateVCOFraction() - print("Measuring polarizer angle") - hc.UpdateProbePolAngleMonitor() - hc.UpdatePumpPolAngleMonitor() - pumpPolAngle = hc.pumpPolAngle - probePolAngle = hc.probePolAngle - - print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) - print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) - print("Bias: " + str(hc.BiasCurrent)) - print("B step: " + str(abs(hc.FlipStepCurrent))) - print("DB step: " + str(abs(hc.CalStepCurrent))) - # load a default BlockConfig and customise it appropriately - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - bc = loadBlockConfig(settingsPath + "default.xml") - bc.Settings["cluster"] = cluster - bc.Settings["eState"] = eState - bc.Settings["bState"] = bState - bc.Settings["rfState"] = rfState - bc.Settings["phaseScramblerV"] = scramblerV - bc.Settings["probePolarizerAngle"] = probePolAngle - bc.Settings["pumpPolarizerAngle"] = pumpPolAngle - bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre - bc.Settings["bBiasV"] = hc.SteppingBiasVoltage - bc.Settings["greenDCFM"] = hc.GreenSynthDCFM - bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude - bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency - bc.Settings["measStartProbePwr"] = measProbePwr - bc.Settings["measStartPumpPwr"] = measPumpPwr - bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 - # these next 3, seemingly redundant, lines are to preserve backward compatibility - bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 - bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 - bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 - bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre - bc.GetModulationByName("RF1A").Step = hc.RF1AttStep - bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre - bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep - bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre - bc.GetModulationByName("RF2A").Step = hc.RF2AttStep - bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre - bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep - bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre - bc.GetModulationByName("RF1F").Step = hc.RF1FMStep - bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre - bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep - bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre - bc.GetModulationByName("RF2F").Step = hc.RF2FMStep - bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre - bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep - bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage - bc.GetModulationByName("LF1").Step = hc.FLPZTStep - bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre - bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep - bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage - bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep - bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre - bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep - - # generate the waveform codes - print("Generating waveform codes ...") - eWave = bc.GetModulationByName("E").Waveform - eWave.Name = "E" - lf1Wave = bc.GetModulationByName("LF1").Waveform - lf1Wave.Name = "LF1" - ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) - bc.GetModulationByName("B").Waveform = ws["B"] - bc.GetModulationByName("DB").Waveform = ws["DB"] - bc.GetModulationByName("PI").Waveform = ws["PI"] - bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] - bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] - bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] - bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] - bc.GetModulationByName("LF2").Waveform = ws["LF2"] - # change the inversions of the static codes E and LF1 - bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() - bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() - # print the waveform codes - # printWaveformCode(bc, "E") - # printWaveformCode(bc, "B") - # printWaveformCode(bc, "DB") - # printWaveformCode(bc, "PI") - # printWaveformCode(bc, "RF1A") - # printWaveformCode(bc, "RF2A") - # printWaveformCode(bc, "RF1F") - # printWaveformCode(bc, "RF2F") - # printWaveformCode(bc, "LF1") - # printWaveformCode(bc, "LF2") - # store e-switch info in block config - print("Storing E switch parameters ...") - bc.Settings["eRampDownTime"] = hc.ERampDownTime - bc.Settings["eRampDownDelay"] = hc.ERampDownDelay - bc.Settings["eBleedTime"] = hc.EBleedTime - bc.Settings["eSwitchTime"] = hc.ESwitchTime - bc.Settings["eRampUpTime"] = hc.ERampUpTime - bc.Settings["eRampUpDelay"] = hc.ERampUpDelay - # this is for legacy analysis compatibility - bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay - bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay - # store the E switch asymmetry in the block - bc.Settings["E0PlusBoost"] = hc.E0PlusBoost - return bc - -# lock gains -# microamps of current per volt of control input -kSteppingBiasCurrentPerVolt = 2453.06 -# max change in the b-bias voltage per block -kBMaxChange = 0.05 -# volts of rf*a input required per cal's worth of offset -kRFAVoltsPerCal = 3.2 -kRFAMaxChange = 0.1 -# volts of rf*f input required per cal's worth of offset -kRFFVoltsPerCal = 8 -kRFFMaxChange = 0.1 - -def updateLocks(bState): - pmtChannelValues = bh.DBlock.ChannelValues[0] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) - rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) - rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) - rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - deltaLF1 = -1.25 * (lf1Value / dbValue) - deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - -def updateLocksNL(bState, blockIndex): - pmtChannelValues = bh.DBlock.ChannelValues[0] - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - # note the weird python syntax for a one element list - sigValue = pmtChannelValues.GetValue(("SIG",)) - bValue = pmtChannelValues.GetValue(("B",)) - dbValue = pmtChannelValues.GetValue(("DB",)) - bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") - rf1aValue = pmtChannelValues.GetValue(("RF1A",)) - rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") - rf2aValue = pmtChannelValues.GetValue(("RF2A",)) - rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") - rf1fValue = pmtChannelValues.GetValue(("RF1F",)) - rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") - rf2fValue = pmtChannelValues.GetValue(("RF2F",)) - rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") - lf1Value = pmtChannelValues.GetValue(("LF1",)) - lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") - lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") - lf2Value = pmtChannelValues.GetValue(("LF2",)) - lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") - - - print "SIG: " + str(sigValue) - print "B: " + str(bValue) + " DB: " + str(dbValue) - print "B.DB" + str(bDBValue) - print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) - print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) - print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) - print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) - print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) - - # B bias lock - # the sign of the feedback depends on the b-state - if bState: - feedbackSign = 1 - else: - feedbackSign = -1 - deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt - deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) - #deltaBias = 0 - print "Attempting to change stepping B bias by " + str(deltaBias) + " V." - newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) - hc.SetSteppingBBiasVoltage( newBiasVoltage ) - # RFA locks - deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal - deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) - deltaRF1A = -0.1 - print "Attempting to change RF1A by " + str(deltaRF1A) + " V." - newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) - hc.SetRF1AttCentre( newRF1A ) - # - deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal - deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) - deltaRF2A = 0 - print "Attempting to change RF2A by " + str(deltaRF2A) + " V." - newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) - hc.SetRF2AttCentre( newRF2A ) - # RFF locks - deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal - deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) - deltaRF1F = 0 - print "Attempting to change RF1F by " + str(deltaRF1F) + " V." - newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) - hc.SetRF1FMCentre( newRF1F ) - # - deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal - deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) - deltaRF2F = 0 - print "Attempting to change RF2F by " + str(deltaRF2F) + " V." - newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) - hc.SetRF2FMCentre( newRF2F ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) - deltaLF1 = 0 - print "Attempting to change LF1 by " + str(deltaLF1) + " V." - newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) - hc.SetFLPZTVoltage( newLF1 ) - # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) - # first cancel the overal movement of the laser - #deltaLF2 = -0.25 - deltaLF2 = 0 - print "Attempting to change LF2 by " + str(deltaLF2) + " V." - newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) - hc.SetPumpAOMVoltage( newLF2 ) - - -def windowValue(value, minValue, maxValue): - if ( (value < maxValue) & (value > minValue) ): - return value - else: - if (value < minValue): - return minValue - else: - return maxValue - -kTargetRotationPeriod = 10 -kReZeroLeakageMonitorsPeriod = 10 -r = Random() - -def EDMGo(): - # Setup - f = None - fileSystem = Environs.FileSystem - dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) - settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" - print("Data directory is : " + dataPath) - print("") - suggestedClusterName = fileSystem.GenerateNextDataFileName() - sm.SelectProfile("Scan B") - - # User inputs data - cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") - if cluster == "": - cluster = suggestedClusterName - print("Using cluster " + suggestedClusterName) - measProbePwr = prompt("Measured probe power (mV_3): ") - measPumpPwr = prompt("Measured pump power (mV_3): ") - nightBool = prompt("Night run (Y/N)? ") - eState = hc.EManualState - print("E-state: " + str(eState)) - bState = hc.BManualState - print("B-state: " + str(bState)) - rfState = hc.RFManualState - print("rf-state: " + str(rfState)) - - # this is to make sure the B current monitor is in a sensible state - hc.UpdateBCurrentMonitor() - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - #print("Waiting For Polarizers (maybe)") - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - - # loop and take data - blockIndex = 0 - maxBlockIndex = 9 - dbValueList = [] - lf2dbdbValueList = [] - pumpVValueList = [] - while blockIndex < maxBlockIndex: - print("Acquiring block " + str(blockIndex) + " ...") - # save the block config and load into blockhead - print("Saving temp config.") - bc.Settings["clusterIndex"] = blockIndex - tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} - saveBlockConfig(tempConfigFile, bc) - System.Threading.Thread.Sleep(500) - print("Loading temp config.") - bh.LoadConfig(tempConfigFile) - # take the block and save it - print("Running ...") - bh.AcquireAndWait() - print("Done.") - blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} - bh.SaveBlock(blockPath) - print("Saved block "+ str(blockIndex) + ".") - # give mma a chance to analyse the block - print("Notifying Mathematica and waiting ...") - writeLatestBlockNotificationFile(cluster, blockIndex) - System.Threading.Thread.Sleep(5000) - print("Done.") - # increment and loop - File.Delete(tempConfigFile) - checkYAGAndFix() - blockIndex = blockIndex + 1 - normedpmtChannelValues = bh.DBlock.ChannelValues[6] - #lf2dbdbValue = bh.analysis.LF1DBDB - rf1adbdbValue = [normedpmtChannelValues.GetSpecialValue("RF1ADBDB"), normedpmtChannelValues.GetSpecialError("RF1ADBDB")] - pumpVValue = hc.PumpAOMFrequencyCentre - - lf2dbdbValueList.append(rf1adbdbValue) - print "rf1adbdb Values: " + str(lf2dbdbValueList).strip('[]') - - updateLocksNL(bState, blockIndex) - # randomise Ramsey phase - scramblerV = 0.799718 * r.NextDouble() - hc.SetScramblerVoltage(scramblerV) - # randomise polarizations - #probePolAngle = 360.0 * r.NextDouble() - #hc.SetProbePolarizerAngle(probePolAngle) - #pumpPolAngle = 360.0 * r.NextDouble() - #hc.SetPumpPolarizerAngle(pumpPolAngle) - hc.SetRandomProbePosition() - hc.SetRandomPumpPosition() - #System.Threading.Thread.Sleep(15000) - - - - bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) - # do things that need periodically doing - # if ((blockIndex % kTargetRotationPeriod) == 0): - # print("Rotating target.") - # hc.StepTarget(10) - - pmtChannelValues = bh.DBlock.ChannelValues[0] - dbValue = pmtChannelValues.GetValue(("DB",)) - - dbValueList.append(dbValue) - if (len(dbValueList) == 4): - del dbValueList[0] - print "DB values for last 3 blocks " + str(dbValueList).strip('[]') - runningdbMean =float(sum(dbValueList)) / len(dbValueList) - if ( runningdbMean < 1 and nightBool is "Y" ): - hc.EnableEField( False ) - hc.SetArgonShutter( True ) - break - - if (dbValue < 10): - print("Dodgy spot target rotation.") - for i in range(2): - hc.StepTarget(2) - System.Threading.Thread.Sleep(500) - if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): - print("Recalibrating leakage monitors.") - # calibrate leakage monitors - print("calibrating leakage monitors..") - print("E-field off") - hc.EnableEField( False ) - System.Threading.Thread.Sleep(10000) - hc.EnableBleed( True ) - System.Threading.Thread.Sleep(5000) - hc.CalibrateIMonitors() - hc.EnableBleed( False ) - System.Threading.Thread.Sleep(500) - print("E-field on") - hc.EnableEField( True ) - print("leakage monitors calibrated") - - bh.StopPattern() - - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + +def saveBlockConfig(path, config): + fs = FileStream(path, FileMode.Create) + s = XmlSerializer(BlockConfig) + s.Serialize(fs,config) + fs.Close() + +def loadBlockConfig(path): + fs = FileStream(path, FileMode.Open) + s = XmlSerializer(BlockConfig) + bc = s.Deserialize(fs) + fs.Close() + return bc + +def writeLatestBlockNotificationFile(cluster, blockIndex): + fs = FileStream(Environs.FileSystem.Paths["settingsPath"] + "\\BlockHead\\latestBlock.txt", FileMode.Create) + sw = StreamWriter(fs) + sw.WriteLine(cluster + "\t" + str(blockIndex)) + sw.Close() + fs.Close() + +def checkYAGAndFix(): + interlockFailed = hc.YAGInterlockFailed; + if (interlockFailed): + bh.StopPattern(); + bh.StartPattern(); + +def printWaveformCode(bc, name): + print(name + ": " + str(bc.GetModulationByName(name).Waveform.Code) + " -- " + str(bc.GetModulationByName(name).Waveform.Inverted)) + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr): + fileSystem = Environs.FileSystem + print("Measuring parameters ...") + bh.StopPattern() + hc.UpdateRFPowerMonitor() + hc.UpdateRFFrequencyMonitor() + bh.StartPattern() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + hc.UpdateI2AOMFreqMonitor() + hc.UpdatePumpAOMFreqMonitor() + hc.UpdateVCOFraction() + print("Measuring polarizer angle") + hc.UpdateProbePolAngleMonitor() + hc.UpdatePumpPolAngleMonitor() + pumpPolAngle = hc.pumpPolAngle + probePolAngle = hc.probePolAngle + + print("V plus: " + str(hc.CPlusMonitorVoltage * hc.CPlusMonitorScale)) + print("V minus: " + str(hc.CMinusMonitorVoltage * hc.CMinusMonitorScale)) + print("Bias: " + str(hc.BiasCurrent)) + print("B step: " + str(abs(hc.FlipStepCurrent))) + print("DB step: " + str(abs(hc.CalStepCurrent))) + # load a default BlockConfig and customise it appropriately + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + bc = loadBlockConfig(settingsPath + "default.xml") + bc.Settings["cluster"] = cluster + bc.Settings["eState"] = eState + bc.Settings["bState"] = bState + bc.Settings["rfState"] = rfState + bc.Settings["phaseScramblerV"] = scramblerV + bc.Settings["probePolarizerAngle"] = probePolAngle + bc.Settings["pumpPolarizerAngle"] = pumpPolAngle + bc.Settings["ePlus"] = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + bc.Settings["eMinus"] = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bc.Settings["pumpAOMFreq"] = hc.PumpAOMFrequencyCentre + bc.Settings["bBiasV"] = hc.SteppingBiasVoltage + bc.Settings["greenDCFM"] = hc.GreenSynthDCFM + bc.Settings["greenAmp"] = hc.GreenSynthOnAmplitude + bc.Settings["greenFreq"] = hc.GreenSynthOnFrequency + bc.Settings["measStartProbePwr"] = measProbePwr + bc.Settings["measStartPumpPwr"] = measPumpPwr + bc.GetModulationByName("B").Centre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").Step = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").Step = abs(hc.CalStepCurrent)/1000 + # these next 3, seemingly redundant, lines are to preserve backward compatibility + bc.GetModulationByName("B").PhysicalCentre = (hc.BiasCurrent)/1000 + bc.GetModulationByName("B").PhysicalStep = abs(hc.FlipStepCurrent)/1000 + bc.GetModulationByName("DB").PhysicalStep = abs(hc.CalStepCurrent)/1000 + bc.GetModulationByName("RF1A").Centre = hc.RF1AttCentre + bc.GetModulationByName("RF1A").Step = hc.RF1AttStep + bc.GetModulationByName("RF1A").PhysicalCentre = hc.RF1PowerCentre + bc.GetModulationByName("RF1A").PhysicalStep = hc.RF1PowerStep + bc.GetModulationByName("RF2A").Centre = hc.RF2AttCentre + bc.GetModulationByName("RF2A").Step = hc.RF2AttStep + bc.GetModulationByName("RF2A").PhysicalCentre = hc.RF2PowerCentre + bc.GetModulationByName("RF2A").PhysicalStep = hc.RF2PowerStep + bc.GetModulationByName("RF1F").Centre = hc.RF1FMCentre + bc.GetModulationByName("RF1F").Step = hc.RF1FMStep + bc.GetModulationByName("RF1F").PhysicalCentre = hc.RF1FrequencyCentre + bc.GetModulationByName("RF1F").PhysicalStep = hc.RF1FrequencyStep + bc.GetModulationByName("RF2F").Centre = hc.RF2FMCentre + bc.GetModulationByName("RF2F").Step = hc.RF2FMStep + bc.GetModulationByName("RF2F").PhysicalCentre = hc.RF2FrequencyCentre + bc.GetModulationByName("RF2F").PhysicalStep = hc.RF2FrequencyStep + bc.GetModulationByName("LF1").Centre = hc.FLPZTVoltage + bc.GetModulationByName("LF1").Step = hc.FLPZTStep + bc.GetModulationByName("LF1").PhysicalCentre = hc.I2LockAOMFrequencyCentre + bc.GetModulationByName("LF1").PhysicalStep = hc.I2LockAOMFrequencyStep + bc.GetModulationByName("LF2").Centre = hc.PumpAOMVoltage + bc.GetModulationByName("LF2").Centre = hc.PumpAOMStep + bc.GetModulationByName("LF2").PhysicalCentre = hc.PumpAOMFrequencyCentre + bc.GetModulationByName("LF2").PhysicalStep = hc.PumpAOMFrequencyStep + + # generate the waveform codes + print("Generating waveform codes ...") + eWave = bc.GetModulationByName("E").Waveform + eWave.Name = "E" + lf1Wave = bc.GetModulationByName("LF1").Waveform + lf1Wave.Name = "LF1" + ws = WaveformSetGenerator.GenerateWaveforms( (eWave, lf1Wave), ("B","DB","PI","RF1A","RF2A","RF1F","RF2F","LF2") ) + bc.GetModulationByName("B").Waveform = ws["B"] + bc.GetModulationByName("DB").Waveform = ws["DB"] + bc.GetModulationByName("PI").Waveform = ws["PI"] + bc.GetModulationByName("RF1A").Waveform = ws["RF1A"] + bc.GetModulationByName("RF2A").Waveform = ws["RF2A"] + bc.GetModulationByName("RF1F").Waveform = ws["RF1F"] + bc.GetModulationByName("RF2F").Waveform = ws["RF2F"] + bc.GetModulationByName("LF2").Waveform = ws["LF2"] + # change the inversions of the static codes E and LF1 + bc.GetModulationByName("E").Waveform.Inverted = WaveformSetGenerator.RandomBool() + bc.GetModulationByName("LF1").Waveform.Inverted = WaveformSetGenerator.RandomBool() + # print the waveform codes + # printWaveformCode(bc, "E") + # printWaveformCode(bc, "B") + # printWaveformCode(bc, "DB") + # printWaveformCode(bc, "PI") + # printWaveformCode(bc, "RF1A") + # printWaveformCode(bc, "RF2A") + # printWaveformCode(bc, "RF1F") + # printWaveformCode(bc, "RF2F") + # printWaveformCode(bc, "LF1") + # printWaveformCode(bc, "LF2") + # store e-switch info in block config + print("Storing E switch parameters ...") + bc.Settings["eRampDownTime"] = hc.ERampDownTime + bc.Settings["eRampDownDelay"] = hc.ERampDownDelay + bc.Settings["eBleedTime"] = hc.EBleedTime + bc.Settings["eSwitchTime"] = hc.ESwitchTime + bc.Settings["eRampUpTime"] = hc.ERampUpTime + bc.Settings["eRampUpDelay"] = hc.ERampUpDelay + # this is for legacy analysis compatibility + bc.Settings["eDischargeTime"] = hc.ERampDownTime + hc.ERampDownDelay + bc.Settings["eChargeTime"] = hc.ERampUpTime + hc.ERampUpDelay + # store the E switch asymmetry in the block + bc.Settings["E0PlusBoost"] = hc.E0PlusBoost + return bc + +# lock gains +# microamps of current per volt of control input +kSteppingBiasCurrentPerVolt = 2453.06 +# max change in the b-bias voltage per block +kBMaxChange = 0.05 +# volts of rf*a input required per cal's worth of offset +kRFAVoltsPerCal = 3.2 +kRFAMaxChange = 0.1 +# volts of rf*f input required per cal's worth of offset +kRFFVoltsPerCal = 8 +kRFFMaxChange = 0.1 + +def updateLocks(bState): + pmtChannelValues = bh.DBlock.ChannelValues[0] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + rf1aValue = pmtChannelValues.GetValue(("RF1A","DB")) + rf2aValue = pmtChannelValues.GetValue(("RF2A","DB")) + rf1fValue = pmtChannelValues.GetValue(("RF1F","DB")) + rf2fValue = pmtChannelValues.GetValue(("RF2F","DB")) + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbValue = pmtChannelValues.GetValue(("LF1","DB")) + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB: " + str(lf1dbValue) + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * (bValue / dbValue)) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (6.0/3.0) * (rf1aValue / dbValue) * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (6.0/3.0) * (rf2aValue / dbValue) * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * (rf1fValue / dbValue) * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * (rf2fValue / dbValue) * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + deltaLF1 = -1.25 * (lf1Value / dbValue) + deltaLF1 = windowValue(deltaLF1, -0.1, 0.1) + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 5 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + +def updateLocksNL(bState, blockIndex): + pmtChannelValues = bh.DBlock.ChannelValues[0] + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + # note the weird python syntax for a one element list + sigValue = pmtChannelValues.GetValue(("SIG",)) + bValue = pmtChannelValues.GetValue(("B",)) + dbValue = pmtChannelValues.GetValue(("DB",)) + bDBValue = normedpmtChannelValues.GetSpecialValue("BDB") + rf1aValue = pmtChannelValues.GetValue(("RF1A",)) + rf1adbdbValue = normedpmtChannelValues.GetSpecialValue("RF1ADBDB") + rf2aValue = pmtChannelValues.GetValue(("RF2A",)) + rf2adbdbValue = normedpmtChannelValues.GetSpecialValue("RF2ADBDB") + rf1fValue = pmtChannelValues.GetValue(("RF1F",)) + rf1fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF1FDBDB") + rf2fValue = pmtChannelValues.GetValue(("RF2F",)) + rf2fdbdbValue = normedpmtChannelValues.GetSpecialValue("RF2FDBDB") + lf1Value = pmtChannelValues.GetValue(("LF1",)) + lf1dbdbValue = normedpmtChannelValues.GetSpecialValue("LF1DBDB") + lf1dbValue = normedpmtChannelValues.GetSpecialValue("LF1DB") + lf2Value = pmtChannelValues.GetValue(("LF2",)) + lf2dbdbValue = normedpmtChannelValues.GetSpecialValue("LF2DBDB") + + + print "SIG: " + str(sigValue) + print "B: " + str(bValue) + " DB: " + str(dbValue) + print "B.DB" + str(bDBValue) + print "RF1A: " + str(rf1aValue) + " RF2A: " + str(rf2aValue) + print "RF1A.DB/DB: " + str(rf1adbdbValue) + " RF2A.DB/DB: " + str(rf2adbdbValue) + print "RF1F: " + str(rf1fValue) + " RF2F: " + str(rf2fValue) + print "LF1: " + str(lf1Value) + " LF1.DB/DB: " + str(lf1dbdbValue) + print "LF2: " + str(lf2Value) + " LF2.DB/DB: " + str(lf2dbdbValue) + + # B bias lock + # the sign of the feedback depends on the b-state + if bState: + feedbackSign = 1 + else: + feedbackSign = -1 + deltaBias = - (1.0/10.0) * feedbackSign * (hc.CalStepCurrent * bDBValue) / kSteppingBiasCurrentPerVolt + deltaBias = windowValue(deltaBias, -kBMaxChange, kBMaxChange) + #deltaBias = 0 + print "Attempting to change stepping B bias by " + str(deltaBias) + " V." + newBiasVoltage = windowValue( hc.SteppingBiasVoltage - deltaBias, -5, 5) + hc.SetSteppingBBiasVoltage( newBiasVoltage ) + # RFA locks + deltaRF1A = - (18.0/2.0) * rf1adbdbValue * kRFAVoltsPerCal + deltaRF1A = windowValue(deltaRF1A, -kRFAMaxChange, kRFAMaxChange) + deltaRF1A = -0.1 + print "Attempting to change RF1A by " + str(deltaRF1A) + " V." + newRF1A = windowValue( hc.RF1AttCentre - deltaRF1A, hc.RF1AttStep, 5 - hc.RF1AttStep) + hc.SetRF1AttCentre( newRF1A ) + # + deltaRF2A = - (18.0/2.0) * rf2adbdbValue * kRFAVoltsPerCal + deltaRF2A = windowValue(deltaRF2A, -kRFAMaxChange, kRFAMaxChange) + deltaRF2A = 0 + print "Attempting to change RF2A by " + str(deltaRF2A) + " V." + newRF2A = windowValue( hc.RF2AttCentre - deltaRF2A, hc.RF2AttStep, 5 - hc.RF2AttStep ) + hc.SetRF2AttCentre( newRF2A ) + # RFF locks + deltaRF1F = - (10.0/4.0) * rf1fdbdbValue * kRFFVoltsPerCal + deltaRF1F = windowValue(deltaRF1F, -kRFFMaxChange, kRFFMaxChange) + deltaRF1F = 0 + print "Attempting to change RF1F by " + str(deltaRF1F) + " V." + newRF1F = windowValue( hc.RF1FMCentre - deltaRF1F, hc.RF1FMStep, 5 - hc.RF1FMStep) + hc.SetRF1FMCentre( newRF1F ) + # + deltaRF2F = - (10.0/4.0) * rf2fdbdbValue * kRFFVoltsPerCal + deltaRF2F = windowValue(deltaRF2F, -kRFFMaxChange, kRFFMaxChange) + deltaRF2F = 0 + print "Attempting to change RF2F by " + str(deltaRF2F) + " V." + newRF2F = windowValue( hc.RF2FMCentre - deltaRF2F, hc.RF2FMStep, 5 - hc.RF2FMStep ) + hc.SetRF2FMCentre( newRF2F ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + #deltaLF1 = 2.5 * ( lf1dbValue) (for Diode laser) + deltaLF1 = 0 + print "Attempting to change LF1 by " + str(deltaLF1) + " V." + newLF1 = windowValue( hc.FLPZTVoltage - deltaLF1, hc.FLPZTStep, 10 - hc.FLPZTStep ) + hc.SetFLPZTVoltage( newLF1 ) + # Laser frequency lock (-ve multiplier in f0 mode and +ve in f1) + # first cancel the overal movement of the laser + #deltaLF2 = -0.25 + deltaLF2 = 0 + print "Attempting to change LF2 by " + str(deltaLF2) + " V." + newLF2 = windowValue( hc.PumpAOMVoltage - deltaLF2, hc.PumpAOMStep, 10 - hc.PumpAOMStep ) + hc.SetPumpAOMVoltage( newLF2 ) + + +def windowValue(value, minValue, maxValue): + if ( (value < maxValue) & (value > minValue) ): + return value + else: + if (value < minValue): + return minValue + else: + return maxValue + +kTargetRotationPeriod = 10 +kReZeroLeakageMonitorsPeriod = 10 +r = Random() + +def EDMGo(): + # Setup + f = None + fileSystem = Environs.FileSystem + dataPath = fileSystem.GetDataDirectory(fileSystem.Paths["edmDataPath"]) + settingsPath = fileSystem.Paths["settingsPath"] + "\\BlockHead\\" + print("Data directory is : " + dataPath) + print("") + suggestedClusterName = fileSystem.GenerateNextDataFileName() + sm.SelectProfile("Scan B") + + # User inputs data + cluster = prompt("Cluster name [" + suggestedClusterName +"]: ") + if cluster == "": + cluster = suggestedClusterName + print("Using cluster " + suggestedClusterName) + measProbePwr = prompt("Measured probe power (mV_3): ") + measPumpPwr = prompt("Measured pump power (mV_3): ") + nightBool = prompt("Night run (Y/N)? ") + eState = hc.EManualState + print("E-state: " + str(eState)) + bState = hc.BManualState + print("B-state: " + str(bState)) + rfState = hc.RFManualState + print("rf-state: " + str(rfState)) + + # this is to make sure the B current monitor is in a sensible state + hc.UpdateBCurrentMonitor() + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + #print("Waiting For Polarizers (maybe)") + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + + # loop and take data + blockIndex = 0 + maxBlockIndex = 9 + dbValueList = [] + lf2dbdbValueList = [] + pumpVValueList = [] + while blockIndex < maxBlockIndex: + print("Acquiring block " + str(blockIndex) + " ...") + # save the block config and load into blockhead + print("Saving temp config.") + bc.Settings["clusterIndex"] = blockIndex + tempConfigFile ='%(p)stemp%(c)s_%(i)s.xml' % {'p': settingsPath, 'c': cluster, 'i': blockIndex} + saveBlockConfig(tempConfigFile, bc) + System.Threading.Thread.Sleep(500) + print("Loading temp config.") + bh.LoadConfig(tempConfigFile) + # take the block and save it + print("Running ...") + bh.AcquireAndWait() + print("Done.") + blockPath = '%(p)s%(c)s_%(i)s.zip' % {'p': dataPath, 'c': cluster, 'i': blockIndex} + bh.SaveBlock(blockPath) + print("Saved block "+ str(blockIndex) + ".") + # give mma a chance to analyse the block + print("Notifying Mathematica and waiting ...") + writeLatestBlockNotificationFile(cluster, blockIndex) + System.Threading.Thread.Sleep(5000) + print("Done.") + # increment and loop + File.Delete(tempConfigFile) + checkYAGAndFix() + blockIndex = blockIndex + 1 + normedpmtChannelValues = bh.DBlock.ChannelValues[6] + #lf2dbdbValue = bh.analysis.LF1DBDB + rf1adbdbValue = [normedpmtChannelValues.GetSpecialValue("RF1ADBDB"), normedpmtChannelValues.GetSpecialError("RF1ADBDB")] + pumpVValue = hc.PumpAOMFrequencyCentre + + lf2dbdbValueList.append(rf1adbdbValue) + print "rf1adbdb Values: " + str(lf2dbdbValueList).strip('[]') + + updateLocksNL(bState, blockIndex) + # randomise Ramsey phase + scramblerV = 0.799718 * r.NextDouble() + hc.SetScramblerVoltage(scramblerV) + # randomise polarizations + #probePolAngle = 360.0 * r.NextDouble() + #hc.SetProbePolarizerAngle(probePolAngle) + #pumpPolAngle = 360.0 * r.NextDouble() + #hc.SetPumpPolarizerAngle(pumpPolAngle) + hc.SetRandomProbePosition() + hc.SetRandomPumpPosition() + #System.Threading.Thread.Sleep(15000) + + + + bc = measureParametersAndMakeBC(cluster, eState, bState, rfState, scramblerV, measProbePwr, measPumpPwr) + # do things that need periodically doing + # if ((blockIndex % kTargetRotationPeriod) == 0): + # print("Rotating target.") + # hc.StepTarget(10) + + pmtChannelValues = bh.DBlock.ChannelValues[0] + dbValue = pmtChannelValues.GetValue(("DB",)) + + dbValueList.append(dbValue) + if (len(dbValueList) == 4): + del dbValueList[0] + print "DB values for last 3 blocks " + str(dbValueList).strip('[]') + runningdbMean =float(sum(dbValueList)) / len(dbValueList) + if ( runningdbMean < 1 and nightBool is "Y" ): + hc.EnableEField( False ) + hc.SetArgonShutter( True ) + break + + if (dbValue < 10): + print("Dodgy spot target rotation.") + for i in range(2): + hc.StepTarget(2) + System.Threading.Thread.Sleep(500) + if ((blockIndex % kReZeroLeakageMonitorsPeriod) == 0): + print("Recalibrating leakage monitors.") + # calibrate leakage monitors + print("calibrating leakage monitors..") + print("E-field off") + hc.EnableEField( False ) + System.Threading.Thread.Sleep(10000) + hc.EnableBleed( True ) + System.Threading.Thread.Sleep(5000) + hc.CalibrateIMonitors() + hc.EnableBleed( False ) + System.Threading.Thread.Sleep(500) + print("E-field on") + hc.EnableEField( True ) + print("leakage monitors calibrated") + + bh.StopPattern() + + +def run_script(): + EDMGo() + diff --git a/EDMScripts/SimpleConditionWithBMonitor.py b/EDMScripts/SimpleConditionWithBMonitor.py index 85cd5047..33bb7df9 100644 --- a/EDMScripts/SimpleConditionWithBMonitor.py +++ b/EDMScripts/SimpleConditionWithBMonitor.py @@ -1,32 +1,32 @@ -from System.Threading import * - -def condition(switchTime): - switchCount = 1 - #loop forever - f = open('27Aug1300.txt', 'a') - f.write("eState, ePlus, eMinus, DB0db0, DB0db1, DB1db0, DB1db1\n") - f.close() - while switchCount > 0: - hc.SwitchEAndWait() - hc.UpdateBCurrentMonitor() - hc.UpdateVMonitor() - eState = hc.EFieldPolarity - ePlus = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale - eMinus = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale - bCurrent00 = hc.BCurrent00 - bCurrent01 = hc.BCurrent01 - bCurrent10 = hc.BCurrent10 - bCurrent11 = hc.BCurrent11 - s = str(eState) + ", " + str(ePlus) + ", " + str(eMinus) + ", " + str(bCurrent00) + ", " + str(bCurrent01) + ", " + str(bCurrent10) + ", " + str(bCurrent11) + "\n" - print s - f = open('27Aug1300.txt', 'a') - f.write(s) - f.close() - System.Threading.Thread.Sleep(1000 * switchTime) - switchCount = switchCount + 1 - - -def run_script(): - print "Use condition(switchTime)" - - +from System.Threading import * + +def condition(switchTime): + switchCount = 1 + #loop forever + f = open('27Aug1300.txt', 'a') + f.write("eState, ePlus, eMinus, DB0db0, DB0db1, DB1db0, DB1db1\n") + f.close() + while switchCount > 0: + hc.SwitchEAndWait() + hc.UpdateBCurrentMonitor() + hc.UpdateVMonitor() + eState = hc.EFieldPolarity + ePlus = hc.CPlusMonitorVoltage * hc.CPlusMonitorScale + eMinus = hc.CMinusMonitorVoltage * hc.CMinusMonitorScale + bCurrent00 = hc.BCurrent00 + bCurrent01 = hc.BCurrent01 + bCurrent10 = hc.BCurrent10 + bCurrent11 = hc.BCurrent11 + s = str(eState) + ", " + str(ePlus) + ", " + str(eMinus) + ", " + str(bCurrent00) + ", " + str(bCurrent01) + ", " + str(bCurrent10) + ", " + str(bCurrent11) + "\n" + print s + f = open('27Aug1300.txt', 'a') + f.write(s) + f.close() + System.Threading.Thread.Sleep(1000 * switchTime) + switchCount = switchCount + 1 + + +def run_script(): + print "Use condition(switchTime)" + + diff --git a/EDMScripts/SwitchE.py b/EDMScripts/SwitchE.py index b7d7c0db..d44411d3 100644 --- a/EDMScripts/SwitchE.py +++ b/EDMScripts/SwitchE.py @@ -1,38 +1,38 @@ -# edm_init.py - sets up the IronPython environment ready for scripting -# the edm control software. - -import clr -import sys -from System.IO import Path - -# Import the edm control software assemblies into IronPython -sys.path.append(Path.GetFullPath("..\\EDMHardwareControl\\bin\\EDM\\")) -clr.AddReferenceToFile("EDMHardwareControl.exe") -clr.AddReferenceToFile("DAQ.dll") - -# Load some system assemblies that we'll need -clr.AddReference("System.Drawing") -clr.AddReference("System.Windows.Forms") -clr.AddReference("System.Xml") - -# code for IronPython remoting problem workaround -class typedproxy(object): - __slots__ = ['obj', 'proxyType'] - def __init__(self, obj, proxyType): - self.obj = obj - self.proxyType = proxyType - def __getattribute__(self, attr): - proxyType = object.__getattribute__(self, 'proxyType') - obj = object.__getattribute__(self, 'obj') - return getattr(proxyType, attr).__get__(obj, proxyType) - - -# create connections to the control programs -import System -import EDMHardwareControl - -hc = typedproxy(System.Activator.GetObject(EDMHardwareControl.Controller, 'tcp://localhost:1172/controller.rem'), EDMHardwareControl.Controller) - -hc.SwitchEAndWait() - - +# edm_init.py - sets up the IronPython environment ready for scripting +# the edm control software. + +import clr +import sys +from System.IO import Path + +# Import the edm control software assemblies into IronPython +sys.path.append(Path.GetFullPath("..\\EDMHardwareControl\\bin\\EDM\\")) +clr.AddReferenceToFile("EDMHardwareControl.exe") +clr.AddReferenceToFile("DAQ.dll") + +# Load some system assemblies that we'll need +clr.AddReference("System.Drawing") +clr.AddReference("System.Windows.Forms") +clr.AddReference("System.Xml") + +# code for IronPython remoting problem workaround +class typedproxy(object): + __slots__ = ['obj', 'proxyType'] + def __init__(self, obj, proxyType): + self.obj = obj + self.proxyType = proxyType + def __getattribute__(self, attr): + proxyType = object.__getattribute__(self, 'proxyType') + obj = object.__getattribute__(self, 'obj') + return getattr(proxyType, attr).__get__(obj, proxyType) + + +# create connections to the control programs +import System +import EDMHardwareControl + +hc = typedproxy(System.Activator.GetObject(EDMHardwareControl.Controller, 'tcp://localhost:1172/controller.rem'), EDMHardwareControl.Controller) + +hc.SwitchEAndWait() + + diff --git a/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py b/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py index 89718739..ee32cf9d 100644 --- a/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py +++ b/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py @@ -1,45 +1,45 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - - - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def EDMGo(): - # loop and take data - blockIndex = 0 - maxBlockIndex = 2000 - polarity = True - voltage = 0 - f = open('C:/Users/edm/Desktop/test.txt', 'a') - - - while blockIndex < maxBlockIndex: - hc.ChangePolarity( polarity ) - print("Measurement Number " + str(blockIndex) + " ...") - print("Polarity is " + str(polarity) ) - System.Threading.Thread.Sleep(1000) - hc.UpdateBVoltage() - voltage = hc.HPVoltage - print("Voltage is " + str(voltage)) - f.write(str(polarity) + " " + str(voltage) + "\n") - polarity = not polarity - blockIndex = blockIndex +1 - - f.close() - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + + + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def EDMGo(): + # loop and take data + blockIndex = 0 + maxBlockIndex = 2000 + polarity = True + voltage = 0 + f = open('C:/Users/edm/Desktop/test.txt', 'a') + + + while blockIndex < maxBlockIndex: + hc.ChangePolarity( polarity ) + print("Measurement Number " + str(blockIndex) + " ...") + print("Polarity is " + str(polarity) ) + System.Threading.Thread.Sleep(1000) + hc.UpdateBVoltage() + voltage = hc.HPVoltage + print("Voltage is " + str(voltage)) + f.write(str(polarity) + " " + str(voltage) + "\n") + polarity = not polarity + blockIndex = blockIndex +1 + + f.close() + +def run_script(): + EDMGo() + diff --git a/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py~ b/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py~ index ccdc5886..7b121a89 100644 --- a/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py~ +++ b/EDMScripts/SwitchEMeasureMultimeterVoltageLoop.py~ @@ -1,45 +1,45 @@ -# Import a whole load of stuff -from System.IO import * -from System.Drawing import * -from System.Runtime.Remoting import * -from System.Threading import * -from System.Windows.Forms import * -from System.Xml.Serialization import * -from System import * - -from Analysis.EDM import * -from DAQ.Environment import * -from EDMConfig import * - - - -def prompt(text): - sys.stdout.write(text) - return sys.stdin.readline().strip() - -def EDMGo(): - # loop and take data - blockIndex = 0 - maxBlockIndex = 20 - polarity = True - voltage = 0 - f = open('C:/Users/edm/Desktop/test.txt', 'a') - - - while blockIndex < maxBlockIndex: - hc.ChangePolarity( polarity ) - print("Measurement Number " + str(blockIndex) + " ...") - print("Polarity is " + str(polarity) ) - System.Threading.Thread.Sleep(1000) - hc.UpdateBVoltage() - voltage = hc.HPVoltage - print("Voltage is " + str(voltage)) - f.write(str(polarity) + " " + str(voltage) + "\n") - polarity = not polarity - blockIndex = blockIndex +1 - - f.close() - -def run_script(): - EDMGo() - +# Import a whole load of stuff +from System.IO import * +from System.Drawing import * +from System.Runtime.Remoting import * +from System.Threading import * +from System.Windows.Forms import * +from System.Xml.Serialization import * +from System import * + +from Analysis.EDM import * +from DAQ.Environment import * +from EDMConfig import * + + + +def prompt(text): + sys.stdout.write(text) + return sys.stdin.readline().strip() + +def EDMGo(): + # loop and take data + blockIndex = 0 + maxBlockIndex = 20 + polarity = True + voltage = 0 + f = open('C:/Users/edm/Desktop/test.txt', 'a') + + + while blockIndex < maxBlockIndex: + hc.ChangePolarity( polarity ) + print("Measurement Number " + str(blockIndex) + " ...") + print("Polarity is " + str(polarity) ) + System.Threading.Thread.Sleep(1000) + hc.UpdateBVoltage() + voltage = hc.HPVoltage + print("Voltage is " + str(voltage)) + f.write(str(polarity) + " " + str(voltage) + "\n") + polarity = not polarity + blockIndex = blockIndex +1 + + f.close() + +def run_script(): + EDMGo() + diff --git a/EDMScripts/ramp up E fields.py b/EDMScripts/ramp up E fields.py index c5cd922d..e093964a 100644 --- a/EDMScripts/ramp up E fields.py +++ b/EDMScripts/ramp up E fields.py @@ -1,31 +1,31 @@ -# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes -# n - -from DAQ.Environment import * - -def RampVoltages(start, stop, step, sleep): - - # start looping - r = range(int(10*start), int(10*stop), int(10*step)) - for i in range(len(r)): - print "E fields at +/- " + str(float(r[i])/10) + " KV" - hc.SetCPlusVoltage(float(r[i])/10) - hc.SetCMinusVoltage(float(r[i])/10) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - raw_input("Measure at your leisure") - r.reverse() - - for i in range(len(r)): - print "E fields at +/- " + str(float(r[i])/10) + " KV" - hc.SetCPlusVoltage(float(r[i])/10) - hc.SetCMinusVoltage(float(r[i])/10) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - print "done" - -def run_script(): - print "Use RampVoltages(start, stop, step, sleep ). Voltages in kV, sleep in ms" - +# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes +# n + +from DAQ.Environment import * + +def RampVoltages(start, stop, step, sleep): + + # start looping + r = range(int(10*start), int(10*stop), int(10*step)) + for i in range(len(r)): + print "E fields at +/- " + str(float(r[i])/10) + " KV" + hc.SetCPlusVoltage(float(r[i])/10) + hc.SetCMinusVoltage(float(r[i])/10) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + raw_input("Measure at your leisure") + r.reverse() + + for i in range(len(r)): + print "E fields at +/- " + str(float(r[i])/10) + " KV" + hc.SetCPlusVoltage(float(r[i])/10) + hc.SetCMinusVoltage(float(r[i])/10) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + print "done" + +def run_script(): + print "Use RampVoltages(start, stop, step, sleep ). Voltages in kV, sleep in ms" + diff --git a/EDMScripts/rampupBertans.py b/EDMScripts/rampupBertans.py index 698063bd..3c716247 100644 --- a/EDMScripts/rampupBertans.py +++ b/EDMScripts/rampupBertans.py @@ -1,31 +1,31 @@ -# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes -# n - -from DAQ.Environment import * - -def RampVoltages(start, stop, step, sleep): - - # start looping - r = range(int(100*start), int(100*stop), int(100*step)) - for i in range(len(r)): - print "E fields at +/- " + str((3*float(r[i]))/100) + " KV" - hc.SetCPlusVoltage(-float(r[i])/100) - hc.SetCMinusVoltage(float(r[i])/100) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - raw_input("Measure at your leisure") - r.reverse() - - for i in range(len(r)): - print "E fields at +/- " + str((3*float(r[i]))/100) + " KV" - hc.SetCPlusVoltage(-float(r[i])/100) - hc.SetCMinusVoltage(float(r[i])/100) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - print "done" - -def run_script(): - print "Use RampVoltages(start, stop, step, sleep). Voltages control voltages (use positive numbers, -sign taken care of in code for +ve supply), sleep in ms" - +# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes +# n + +from DAQ.Environment import * + +def RampVoltages(start, stop, step, sleep): + + # start looping + r = range(int(100*start), int(100*stop), int(100*step)) + for i in range(len(r)): + print "E fields at +/- " + str((3*float(r[i]))/100) + " KV" + hc.SetCPlusVoltage(-float(r[i])/100) + hc.SetCMinusVoltage(float(r[i])/100) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + raw_input("Measure at your leisure") + r.reverse() + + for i in range(len(r)): + print "E fields at +/- " + str((3*float(r[i]))/100) + " KV" + hc.SetCPlusVoltage(-float(r[i])/100) + hc.SetCMinusVoltage(float(r[i])/100) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + print "done" + +def run_script(): + print "Use RampVoltages(start, stop, step, sleep). Voltages control voltages (use positive numbers, -sign taken care of in code for +ve supply), sleep in ms" + diff --git a/EDMScripts/rampupaKV.py b/EDMScripts/rampupaKV.py index 245c512b..d0422f11 100644 --- a/EDMScripts/rampupaKV.py +++ b/EDMScripts/rampupaKV.py @@ -1,31 +1,31 @@ -# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes -# n - -from DAQ.Environment import * - -def RampVoltages(start, stop, step, sleep): - - # start looping - r = range(int(100*start), int(100*stop), int(100*step)) - for i in range(len(r)): - print "E fields at +/- " + str((float(r[i]))/100) + " KV" - hc.SetCPlusVoltage(float(r[i])/100) - hc.SetCMinusVoltage(float(r[i])/100) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - raw_input("Measure at your leisure") - r.reverse() - - for i in range(len(r)): - print "E fields at +/- " + str((float(r[i]))/100) + " KV" - hc.SetCPlusVoltage(float(r[i])/100) - hc.SetCMinusVoltage(float(r[i])/100) - print "waiting for " + str(sleep) + " milliseconds" - System.Threading.Thread.Sleep(sleep) - - print "done" - -def run_script(): - print "Use RampVoltages(start, stop, step, sleep). Voltages control voltages, sleep in ms" - +# This loop monitors the rf Discharges for a particular amplitude, then repeats for other amplitudes +# n + +from DAQ.Environment import * + +def RampVoltages(start, stop, step, sleep): + + # start looping + r = range(int(100*start), int(100*stop), int(100*step)) + for i in range(len(r)): + print "E fields at +/- " + str((float(r[i]))/100) + " KV" + hc.SetCPlusVoltage(float(r[i])/100) + hc.SetCMinusVoltage(float(r[i])/100) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + raw_input("Measure at your leisure") + r.reverse() + + for i in range(len(r)): + print "E fields at +/- " + str((float(r[i]))/100) + " KV" + hc.SetCPlusVoltage(float(r[i])/100) + hc.SetCMinusVoltage(float(r[i])/100) + print "waiting for " + str(sleep) + " milliseconds" + System.Threading.Thread.Sleep(sleep) + + print "done" + +def run_script(): + print "Use RampVoltages(start, stop, step, sleep). Voltages control voltages, sleep in ms" + diff --git a/EDMSuite.sln b/EDMSuite.sln index 7b693f74..4105a7b7 100644 --- a/EDMSuite.sln +++ b/EDMSuite.sln @@ -1,984 +1,1801 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScanMaster", "ScanMaster\ScanMaster.csproj", "{373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAQ", "DAQ\DAQ.csproj", "{BB737B99-2E9F-40C9-9809-895A7C51AD40}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedCode", "SharedCode\SharedCode.csproj", "{BA0A0540-3F1C-483B-A180-CB78DF424F15}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMHardwareControl", "EDMHardwareControl\EDMHardwareControl.csproj", "{DFE81EE7-F9AF-4551-B3D7-336F14101AB6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecelerationHardwareControl", "DecelerationHardwareControl\DecelerationHardwareControl.csproj", "{5B795C2A-3D76-4F42-94DF-1E823ED7AB90}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecelerationLaserLock", "DecelerationLaserLock\DecelerationLaserLock.csproj", "{8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMBlockHead", "EDMBlockHead\EDMBlockHead.csproj", "{DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMPhaseLock", "EDMPhaseLock\EDMPhaseLock.csproj", "{216E6D83-0304-4A0C-9BA7-F9DDF58F274A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SympatheticHardwareControl", "SympatheticHardwareControl\SympatheticHardwareControl.csproj", "{B223A45D-2F25-437F-B7DF-CE6C8DF97451}" - ProjectSection(ProjectDependencies) = postProject - {BB737B99-2E9F-40C9-9809-895A7C51AD40} = {BB737B99-2E9F-40C9-9809-895A7C51AD40} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SirCachealot", "SirCachealot\SirCachealot.csproj", "{548E9AAE-FE20-42BE-B66F-84C41B510610}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SonOfSirCachealot", "SonOfSirCachealot\SonOfSirCachealot.csproj", "{434CD947-D8DB-4DB6-B28D-1879CB0E0353}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferCavityLock2012", "TransferCavityLock2012\TransferCavityLock2012.csproj", "{F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuffergasHardwareControl", "BuffergasHardwareControl\BuffergasHardwareControl.csproj", "{17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IMAQ", "IMAQ\IMAQ.csproj", "{FCE9FC5D-8BC1-4517-B4F6-AA446831A930}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MOTMaster", "MOTMaster\MOTMaster.csproj", "{693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SympatheticMOTMasterScripts", "SympatheticMOTMasterScripts\SympatheticMOTMasterScripts.csproj", "{F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoleculeMOTMasterScripts", "MoleculeMOTMasterScripts\MoleculeMOTMasterScripts.csproj", "{F5547C23-4266-47BA-83C8-B3C96E5D6A07}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShapedPulseMaker", "ShapedPulseMaker\ShapedPulseMaker.csproj", "{F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - AnritsuVNA|Any CPU = AnritsuVNA|Any CPU - AnritsuVNA|Mixed Platforms = AnritsuVNA|Mixed Platforms - AnritsuVNA|x86 = AnritsuVNA|x86 - Buffer|Any CPU = Buffer|Any CPU - Buffer|Mixed Platforms = Buffer|Mixed Platforms - Buffer|x86 = Buffer|x86 - BufferClassic|Any CPU = BufferClassic|Any CPU - BufferClassic|Mixed Platforms = BufferClassic|Mixed Platforms - BufferClassic|x86 = BufferClassic|x86 - CaF|Any CPU = CaF|Any CPU - CaF|Mixed Platforms = CaF|Mixed Platforms - CaF|x86 = CaF|x86 - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Decelerator|Any CPU = Decelerator|Any CPU - Decelerator|Mixed Platforms = Decelerator|Mixed Platforms - Decelerator|x86 = Decelerator|x86 - EDM|Any CPU = EDM|Any CPU - EDM|Mixed Platforms = EDM|Mixed Platforms - EDM|x86 = EDM|x86 - EDMAnalysis|Any CPU = EDMAnalysis|Any CPU - EDMAnalysis|Mixed Platforms = EDMAnalysis|Mixed Platforms - EDMAnalysis|x86 = EDMAnalysis|x86 - EDMTestCrate|Any CPU = EDMTestCrate|Any CPU - EDMTestCrate|Mixed Platforms = EDMTestCrate|Mixed Platforms - EDMTestCrate|x86 = EDMTestCrate|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - SrF|Any CPU = SrF|Any CPU - SrF|Mixed Platforms = SrF|Mixed Platforms - SrF|x86 = SrF|x86 - Sympathetic|Any CPU = Sympathetic|Any CPU - Sympathetic|Mixed Platforms = Sympathetic|Mixed Platforms - Sympathetic|x86 = Sympathetic|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Any CPU.Build.0 = CaF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|x86.ActiveCfg = CaF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Any CPU.Build.0 = EDM|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|x86.ActiveCfg = EDM|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Any CPU.Build.0 = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|x86.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Any CPU.Build.0 = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|x86.ActiveCfg = SrF|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Any CPU.Build.0 = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Any CPU.Build.0 = CaF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|x86.ActiveCfg = CaF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Any CPU.Build.0 = EDM|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|x86.ActiveCfg = EDM|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMTestCrate|Mixed Platforms.Build.0 = EDMTestCrate|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Any CPU.Build.0 = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|x86.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Any CPU.Build.0 = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|x86.ActiveCfg = SrF|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Any CPU.Build.0 = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Any CPU.Build.0 = CaF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|x86.ActiveCfg = CaF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Any CPU.Build.0 = EDM|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|x86.ActiveCfg = EDM|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMTestCrate|Mixed Platforms.Build.0 = EDMTestCrate|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Any CPU.Build.0 = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|x86.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Any CPU.Build.0 = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|x86.ActiveCfg = SrF|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|x86.ActiveCfg = CaF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Any CPU.Build.0 = EDM|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|x86.ActiveCfg = EDM|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Any CPU.Build.0 = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|x86.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|x86.ActiveCfg = SrF|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Any CPU.Build.0 = CaF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|x86.ActiveCfg = CaF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|x86.ActiveCfg = EDM|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Any CPU.Build.0 = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|x86.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|x86.ActiveCfg = SrF|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Any CPU.Build.0 = CaF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|x86.ActiveCfg = CaF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|x86.ActiveCfg = EDM|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Any CPU.Build.0 = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|x86.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|x86.ActiveCfg = SrF|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|x86.ActiveCfg = CaF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Any CPU.Build.0 = EDM|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|x86.ActiveCfg = EDM|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Any CPU.Build.0 = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|x86.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|x86.ActiveCfg = SrF|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|x86.ActiveCfg = CaF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Any CPU.Build.0 = EDM|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|x86.ActiveCfg = EDM|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Any CPU.Build.0 = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|x86.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|x86.ActiveCfg = SrF|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|x86.ActiveCfg = CaF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|x86.ActiveCfg = EDM|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Any CPU.Build.0 = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|x86.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|x86.ActiveCfg = SrF|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|x86.ActiveCfg = CaF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Any CPU.Build.0 = EDM|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|x86.ActiveCfg = EDM|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Any CPU.Build.0 = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|x86.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|x86.ActiveCfg = SrF|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|x86.ActiveCfg = CaF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|x86.ActiveCfg = EDM|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Any CPU.Build.0 = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|x86.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|x86.ActiveCfg = SrF|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Any CPU.Build.0 = CaF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|x86.ActiveCfg = CaF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Any CPU.Build.0 = EDM|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|x86.ActiveCfg = EDM|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Any CPU.Build.0 = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|x86.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Any CPU.Build.0 = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|x86.ActiveCfg = SrF|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|x86.ActiveCfg = CaF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|x86.ActiveCfg = EDM|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Any CPU.Build.0 = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|x86.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|x86.ActiveCfg = SrF|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Any CPU.Build.0 = CaF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|x86.ActiveCfg = CaF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|x86.ActiveCfg = EDM|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Any CPU.Build.0 = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|x86.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|x86.ActiveCfg = SrF|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.CaF|x86.ActiveCfg = CaF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDM|x86.ActiveCfg = EDM|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Release|Any CPU.Build.0 = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Release|x86.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.SrF|x86.ActiveCfg = SrF|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Any CPU.Build.0 = Buffer|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|x86.ActiveCfg = Buffer|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|Any CPU.ActiveCfg = CaF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|x86.ActiveCfg = CaF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Any CPU.Build.0 = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|x86.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|Any CPU.ActiveCfg = EDM|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|x86.ActiveCfg = EDM|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Any CPU.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Any CPU.Build.0 = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Mixed Platforms.Build.0 = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|x86.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Any CPU.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|x86.ActiveCfg = SrF|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU - {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Buffer|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Buffer|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Buffer|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.BufferClassic|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.BufferClassic|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.CaF|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.CaF|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.CaF|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.CaF|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Debug|x86.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Decelerator|Any CPU.Build.0 = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Decelerator|x86.ActiveCfg = Debug|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDM|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDM|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDM|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMTestCrate|Any CPU.ActiveCfg = EDMTestCrate|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMTestCrate|Any CPU.Build.0 = EDMTestCrate|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMTestCrate|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.EDMTestCrate|x86.ActiveCfg = EDMTestCrate|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Release|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Release|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.SrF|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.SrF|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.SrF|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.SrF|x86.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Sympathetic|Any CPU.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07}.Sympathetic|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Buffer|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Buffer|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Buffer|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.BufferClassic|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.BufferClassic|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.CaF|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.CaF|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.CaF|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.CaF|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Debug|x86.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Decelerator|Any CPU.Build.0 = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Decelerator|x86.ActiveCfg = Debug|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDM|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDM|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDM|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDM|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMTestCrate|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMTestCrate|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMTestCrate|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMTestCrate|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.EDMTestCrate|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Release|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Release|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.SrF|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.SrF|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.SrF|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.SrF|x86.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Sympathetic|Any CPU.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU - {F951E985-DFC3-48E7-8D3D-ED4F1CFA4D62}.Sympathetic|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScanMaster", "ScanMaster\ScanMaster.csproj", "{373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAQ", "DAQ\DAQ.csproj", "{BB737B99-2E9F-40C9-9809-895A7C51AD40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedCode", "SharedCode\SharedCode.csproj", "{BA0A0540-3F1C-483B-A180-CB78DF424F15}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMHardwareControl", "EDMHardwareControl\EDMHardwareControl.csproj", "{DFE81EE7-F9AF-4551-B3D7-336F14101AB6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecelerationHardwareControl", "DecelerationHardwareControl\DecelerationHardwareControl.csproj", "{5B795C2A-3D76-4F42-94DF-1E823ED7AB90}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DecelerationLaserLock", "DecelerationLaserLock\DecelerationLaserLock.csproj", "{8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMBlockHead", "EDMBlockHead\EDMBlockHead.csproj", "{DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDMPhaseLock", "EDMPhaseLock\EDMPhaseLock.csproj", "{216E6D83-0304-4A0C-9BA7-F9DDF58F274A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SympatheticHardwareControl", "SympatheticHardwareControl\SympatheticHardwareControl.csproj", "{B223A45D-2F25-437F-B7DF-CE6C8DF97451}" + ProjectSection(ProjectDependencies) = postProject + {BB737B99-2E9F-40C9-9809-895A7C51AD40} = {BB737B99-2E9F-40C9-9809-895A7C51AD40} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SirCachealot", "SirCachealot\SirCachealot.csproj", "{548E9AAE-FE20-42BE-B66F-84C41B510610}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferCavityLock", "TransferCavityLock\TransferCavityLock.csproj", "{F91026E7-ED05-403E-923B-686806A0DF4F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SonOfSirCachealot", "SonOfSirCachealot\SonOfSirCachealot.csproj", "{434CD947-D8DB-4DB6-B28D-1879CB0E0353}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferCavityLock2012", "TransferCavityLock2012\TransferCavityLock2012.csproj", "{F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuffergasHardwareControl", "BuffergasHardwareControl\BuffergasHardwareControl.csproj", "{17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IMAQ", "IMAQ\IMAQ.csproj", "{FCE9FC5D-8BC1-4517-B4F6-AA446831A930}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SympatheticMOTMasterScripts", "SympatheticMOTMasterScripts\SympatheticMOTMasterScripts.csproj", "{F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NavigatorHardwareControl", "NavigatorHardwareControl\NavigatorHardwareControl.csproj", "{9B288421-2702-47E7-86FB-CBB85BE743F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFMOTHardwareControl", "RFMOTHardwareControl\RFMOTHardwareControl.csproj", "{B9E73DE5-9E38-48D0-AF97-4FE5242E2723}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFMOTMOTMasterScripts", "RFMOTMOTMasterScripts\RFMOTMOTMasterScripts.csproj", "{AABA623B-9FAB-4DB2-9233-C6A63285C329}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MOTMaster2", "MotMaster2\MOTMaster2.csproj", "{699D21D2-55DB-4A38-B091-BCC1883065AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICEBLOCTest", "ICEBLOCTest\ICEBLOCTest.csproj", "{ED7BD5BA-7F85-4F26-9B84-A258269B60E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UtilsLib", "Utils\UtilsLib.csproj", "{A377A708-96B9-4569-BC22-0187D647611E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + AnritsuVNA|Any CPU = AnritsuVNA|Any CPU + AnritsuVNA|Mixed Platforms = AnritsuVNA|Mixed Platforms + AnritsuVNA|x64 = AnritsuVNA|x64 + AnritsuVNA|x86 = AnritsuVNA|x86 + Buffer|Any CPU = Buffer|Any CPU + Buffer|Mixed Platforms = Buffer|Mixed Platforms + Buffer|x64 = Buffer|x64 + Buffer|x86 = Buffer|x86 + BufferClassic|Any CPU = BufferClassic|Any CPU + BufferClassic|Mixed Platforms = BufferClassic|Mixed Platforms + BufferClassic|x64 = BufferClassic|x64 + BufferClassic|x86 = BufferClassic|x86 + CaF|Any CPU = CaF|Any CPU + CaF|Mixed Platforms = CaF|Mixed Platforms + CaF|x64 = CaF|x64 + CaF|x86 = CaF|x86 + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Decelerator|Any CPU = Decelerator|Any CPU + Decelerator|Mixed Platforms = Decelerator|Mixed Platforms + Decelerator|x64 = Decelerator|x64 + Decelerator|x86 = Decelerator|x86 + EDM|Any CPU = EDM|Any CPU + EDM|Mixed Platforms = EDM|Mixed Platforms + EDM|x64 = EDM|x64 + EDM|x86 = EDM|x86 + EDMAnalysis|Any CPU = EDMAnalysis|Any CPU + EDMAnalysis|Mixed Platforms = EDMAnalysis|Mixed Platforms + EDMAnalysis|x64 = EDMAnalysis|x64 + EDMAnalysis|x86 = EDMAnalysis|x86 + Nav|Any CPU = Nav|Any CPU + Nav|Mixed Platforms = Nav|Mixed Platforms + Nav|x64 = Nav|x64 + Nav|x86 = Nav|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x64 = Release|x64 + Release|x86 = Release|x86 + RFMO|Any CPU = RFMO|Any CPU + RFMO|Mixed Platforms = RFMO|Mixed Platforms + RFMO|x64 = RFMO|x64 + RFMO|x86 = RFMO|x86 + RFMOT|Any CPU = RFMOT|Any CPU + RFMOT|Mixed Platforms = RFMOT|Mixed Platforms + RFMOT|x64 = RFMOT|x64 + RFMOT|x86 = RFMOT|x86 + SrF|Any CPU = SrF|Any CPU + SrF|Mixed Platforms = SrF|Mixed Platforms + SrF|x64 = SrF|x64 + SrF|x86 = SrF|x86 + Sympathetic|Any CPU = Sympathetic|Any CPU + Sympathetic|Mixed Platforms = Sympathetic|Mixed Platforms + Sympathetic|x64 = Sympathetic|x64 + Sympathetic|x86 = Sympathetic|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Any CPU.Build.0 = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|x64.ActiveCfg = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.CaF|x86.ActiveCfg = CaF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Any CPU.Build.0 = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|x64.ActiveCfg = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDM|x86.ActiveCfg = EDM|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Any CPU.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|x64.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Release|x86.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|x64.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMO|x86.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Any CPU.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|x64.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.SrF|x86.ActiveCfg = SrF|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {373F31F0-A7B3-4EDA-BFAC-8F9E948F6D40}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Any CPU.Build.0 = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Any CPU.Build.0 = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|x64.ActiveCfg = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.CaF|x86.ActiveCfg = CaF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Mixed Platforms.ActiveCfg = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|Mixed Platforms.Build.0 = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Any CPU.Build.0 = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|x64.ActiveCfg = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDM|x86.ActiveCfg = EDM|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|Any CPU.ActiveCfg = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|Any CPU.Build.0 = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|x64.ActiveCfg = Nav|x64 + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|x64.Build.0 = Nav|x64 + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|x86.ActiveCfg = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Nav|x86.Build.0 = Nav|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Any CPU.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|x64.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Release|x86.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|x64.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMO|x86.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Any CPU.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|x64.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.SrF|x86.ActiveCfg = SrF|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {BB737B99-2E9F-40C9-9809-895A7C51AD40}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Any CPU.Build.0 = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Any CPU.Build.0 = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|x64.ActiveCfg = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.CaF|x86.ActiveCfg = CaF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Any CPU.Build.0 = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|x64.ActiveCfg = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDM|x86.ActiveCfg = EDM|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|Any CPU.ActiveCfg = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|Any CPU.Build.0 = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|x64.ActiveCfg = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|x86.ActiveCfg = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Nav|x86.Build.0 = Nav|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Any CPU.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|x64.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Release|x86.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|x64.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMO|x86.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Any CPU.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|x64.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.SrF|x86.ActiveCfg = SrF|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {BA0A0540-3F1C-483B-A180-CB78DF424F15}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|x64.ActiveCfg = CaF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.CaF|x86.ActiveCfg = CaF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Any CPU.Build.0 = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|x64.ActiveCfg = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDM|x86.ActiveCfg = EDM|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Any CPU.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|x64.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Release|x86.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|x64.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMO|x86.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|x64.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.SrF|x86.ActiveCfg = SrF|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {DFE81EE7-F9AF-4551-B3D7-336F14101AB6}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Any CPU.Build.0 = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|x64.ActiveCfg = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.CaF|x86.ActiveCfg = CaF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|x64.ActiveCfg = EDM|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDM|x86.ActiveCfg = EDM|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Any CPU.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|x64.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Release|x86.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|x64.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMO|x86.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|x64.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.SrF|x86.ActiveCfg = SrF|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {5B795C2A-3D76-4F42-94DF-1E823ED7AB90}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Any CPU.Build.0 = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|x64.ActiveCfg = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.CaF|x86.ActiveCfg = CaF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|x64.ActiveCfg = EDM|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDM|x86.ActiveCfg = EDM|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Any CPU.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|x64.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Release|x86.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|x64.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMO|x86.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|x64.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.SrF|x86.ActiveCfg = SrF|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {8A6D6B26-EE29-49AA-8C0D-8585FE8AB3CA}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|x64.ActiveCfg = CaF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.CaF|x86.ActiveCfg = CaF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Any CPU.Build.0 = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|x64.ActiveCfg = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDM|x86.ActiveCfg = EDM|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Any CPU.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|x64.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Release|x86.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|x64.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMO|x86.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|x64.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.SrF|x86.ActiveCfg = SrF|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {DE347012-B8E0-4A43-A37F-5F30D0F3CBE1}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|x64.ActiveCfg = CaF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.CaF|x86.ActiveCfg = CaF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Any CPU.Build.0 = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|x64.ActiveCfg = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDM|x86.ActiveCfg = EDM|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Any CPU.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|x64.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Release|x86.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|x64.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMO|x86.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|x64.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.SrF|x86.ActiveCfg = SrF|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {216E6D83-0304-4A0C-9BA7-F9DDF58F274A}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|x64.ActiveCfg = CaF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.CaF|x86.ActiveCfg = CaF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|x64.ActiveCfg = EDM|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDM|x86.ActiveCfg = EDM|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Any CPU.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|x64.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Release|x86.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|x64.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMO|x86.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|x64.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.SrF|x86.ActiveCfg = SrF|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {B223A45D-2F25-437F-B7DF-CE6C8DF97451}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|x64.ActiveCfg = CaF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.CaF|x86.ActiveCfg = CaF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Any CPU.Build.0 = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|x64.ActiveCfg = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDM|x86.ActiveCfg = EDM|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Any CPU.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|x64.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Release|x86.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|x64.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMO|x86.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|x64.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.SrF|x86.ActiveCfg = SrF|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {548E9AAE-FE20-42BE-B66F-84C41B510610}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.CaF|x64.ActiveCfg = CaF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.CaF|x86.ActiveCfg = CaF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Debug|Any CPU.ActiveCfg = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Debug|Any CPU.Build.0 = Buffer|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDM|x64.ActiveCfg = EDM|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDM|x86.ActiveCfg = EDM|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|Any CPU.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|Any CPU.Build.0 = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|x64.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Release|x86.ActiveCfg = BufferClassic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|x64.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMO|x86.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.SrF|x64.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.SrF|x86.ActiveCfg = SrF|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {F91026E7-ED05-403E-923B-686806A0DF4F}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|x64.ActiveCfg = CaF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.CaF|x86.ActiveCfg = CaF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|x64.ActiveCfg = EDM|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDM|x86.ActiveCfg = EDM|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Any CPU.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|x64.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Release|x86.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|x64.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMO|x86.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|x64.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.SrF|x86.ActiveCfg = SrF|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {434CD947-D8DB-4DB6-B28D-1879CB0E0353}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Any CPU.Build.0 = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|x64.ActiveCfg = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.CaF|x86.ActiveCfg = CaF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Any CPU.Build.0 = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|x64.ActiveCfg = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDM|x86.ActiveCfg = EDM|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Any CPU.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|x64.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Release|x86.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|x64.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMO|x86.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Any CPU.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|x64.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.SrF|x86.ActiveCfg = SrF|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {F1BF43A3-5641-4ADF-81CB-35BC0D9AC423}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|x64.ActiveCfg = CaF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.CaF|x86.ActiveCfg = CaF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|x64.ActiveCfg = EDM|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDM|x86.ActiveCfg = EDM|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Any CPU.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|x64.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Release|x86.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|x64.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMO|x86.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|x64.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.SrF|x86.ActiveCfg = SrF|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {17AE4B60-4B86-4A09-BEED-4C6A6CCFA8AF}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Any CPU.Build.0 = CaF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|x64.ActiveCfg = CaF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.CaF|x86.ActiveCfg = CaF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Any CPU.ActiveCfg = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Any CPU.Build.0 = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Mixed Platforms.ActiveCfg = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|Mixed Platforms.Build.0 = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|x64.ActiveCfg = EDM|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDM|x86.ActiveCfg = EDM|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|Any CPU.ActiveCfg = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|Any CPU.Build.0 = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|x64.ActiveCfg = Nav|x64 + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|x64.Build.0 = Nav|x64 + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|x86.ActiveCfg = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Nav|x86.Build.0 = Nav|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Any CPU.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|x64.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Release|x86.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|x64.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMO|x86.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|x64.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.SrF|x86.ActiveCfg = SrF|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|x64.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.AnritsuVNA|x86.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|x64.ActiveCfg = CaF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.CaF|x86.ActiveCfg = CaF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|x64.ActiveCfg = EDM|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDM|x86.ActiveCfg = EDM|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Nav|Any CPU.ActiveCfg = EDMTestCrate|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Nav|Any CPU.Build.0 = EDMTestCrate|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Nav|Mixed Platforms.ActiveCfg = EDMTestCrate|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Nav|x64.ActiveCfg = EDMTestCrate|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Nav|x86.ActiveCfg = EDMTestCrate|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Any CPU.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Any CPU.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|Mixed Platforms.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|x64.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Release|x86.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|Any CPU.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|Any CPU.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|Mixed Platforms.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|x64.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMO|x86.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|Any CPU.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|Any CPU.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|Mixed Platforms.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|x64.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.RFMOT|x86.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|x64.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.SrF|x86.ActiveCfg = SrF|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {F5FE3F55-C1E7-4C23-B2CF-C0F70C2F5830}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.AnritsuVNA|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Buffer|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.BufferClassic|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.CaF|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|x64.ActiveCfg = Debug|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|x64.Build.0 = Debug|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|x86.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Debug|x86.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|Any CPU.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|x64.ActiveCfg = Debug|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|x64.Build.0 = Debug|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|x86.ActiveCfg = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Decelerator|x86.Build.0 = Debug|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDM|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.EDMAnalysis|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|Any CPU.ActiveCfg = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|Any CPU.Build.0 = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|x86.ActiveCfg = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Nav|x86.Build.0 = Nav|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|x64.ActiveCfg = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|x64.Build.0 = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Release|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|x64.ActiveCfg = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|x64.Build.0 = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMO|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|x64.ActiveCfg = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|x64.Build.0 = Release|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.RFMOT|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.SrF|x86.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|Any CPU.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|x64.ActiveCfg = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|x64.Build.0 = Nav|x64 + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|x86.ActiveCfg = Release|Any CPU + {9B288421-2702-47E7-86FB-CBB85BE743F8}.Sympathetic|x86.Build.0 = Release|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|Any CPU.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|Any CPU.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|Mixed Platforms.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|x64.ActiveCfg = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.AnritsuVNA|x86.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|Any CPU.Build.0 = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|x64.ActiveCfg = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.CaF|x86.ActiveCfg = CaF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|Any CPU.Build.0 = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|x64.ActiveCfg = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDM|x86.ActiveCfg = EDM|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|Any CPU.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|Any CPU.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|x64.ActiveCfg = Sympathetic|x64 + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|x64.Build.0 = Sympathetic|x64 + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|x86.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Nav|x86.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|Any CPU.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|Any CPU.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|Mixed Platforms.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|x64.ActiveCfg = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Release|x86.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|Any CPU.ActiveCfg = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|Any CPU.Build.0 = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|Mixed Platforms.ActiveCfg = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|Mixed Platforms.Build.0 = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|x64.ActiveCfg = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMO|x86.ActiveCfg = RFMO|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|Any CPU.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|Any CPU.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|Mixed Platforms.Build.0 = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|x64.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.RFMOT|x86.ActiveCfg = RFMOT|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|Any CPU.Build.0 = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|x64.ActiveCfg = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.SrF|x86.ActiveCfg = SrF|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {B9E73DE5-9E38-48D0-AF97-4FE5242E2723}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|Any CPU.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|Any CPU.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|Mixed Platforms.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|x64.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.AnritsuVNA|x86.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|Any CPU.ActiveCfg = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|Any CPU.Build.0 = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|Mixed Platforms.ActiveCfg = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|Mixed Platforms.Build.0 = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|x64.ActiveCfg = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Buffer|x86.ActiveCfg = Buffer|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|Any CPU.ActiveCfg = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|Any CPU.Build.0 = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|Mixed Platforms.ActiveCfg = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|Mixed Platforms.Build.0 = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|x64.ActiveCfg = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.BufferClassic|x86.ActiveCfg = BufferClassic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|Any CPU.ActiveCfg = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|Any CPU.Build.0 = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|Mixed Platforms.ActiveCfg = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|Mixed Platforms.Build.0 = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|x64.ActiveCfg = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.CaF|x86.ActiveCfg = CaF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|Any CPU.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|Any CPU.Build.0 = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|Mixed Platforms.Build.0 = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|x64.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Debug|x86.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|Any CPU.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|Any CPU.Build.0 = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|Mixed Platforms.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|Mixed Platforms.Build.0 = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|x64.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Decelerator|x86.ActiveCfg = Decelerator|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|Any CPU.ActiveCfg = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|Any CPU.Build.0 = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|Mixed Platforms.ActiveCfg = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|Mixed Platforms.Build.0 = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|x64.ActiveCfg = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDM|x86.ActiveCfg = EDM|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|Any CPU.ActiveCfg = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|Any CPU.Build.0 = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|Mixed Platforms.ActiveCfg = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|Mixed Platforms.Build.0 = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|x64.ActiveCfg = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.EDMAnalysis|x86.ActiveCfg = EDMAnalysis|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Nav|Any CPU.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Nav|Any CPU.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Nav|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Nav|x64.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Nav|x86.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|Any CPU.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|Any CPU.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|Mixed Platforms.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|x64.ActiveCfg = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Release|x86.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|Any CPU.ActiveCfg = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|Any CPU.Build.0 = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|Mixed Platforms.ActiveCfg = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|Mixed Platforms.Build.0 = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|x64.ActiveCfg = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMO|x86.ActiveCfg = RFMO|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|Any CPU.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|Any CPU.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|Mixed Platforms.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|Mixed Platforms.Build.0 = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|x64.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.RFMOT|x86.ActiveCfg = RFMOT|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|Any CPU.ActiveCfg = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|Any CPU.Build.0 = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|Mixed Platforms.ActiveCfg = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|Mixed Platforms.Build.0 = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|x64.ActiveCfg = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.SrF|x86.ActiveCfg = SrF|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|Any CPU.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|Any CPU.Build.0 = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|Mixed Platforms.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|Mixed Platforms.Build.0 = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|x64.ActiveCfg = Sympathetic|Any CPU + {AABA623B-9FAB-4DB2-9233-C6A63285C329}.Sympathetic|x86.ActiveCfg = Sympathetic|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Buffer|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.BufferClassic|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.CaF|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|Any CPU.Build.0 = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|x64.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Decelerator|x86.ActiveCfg = Debug|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDM|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Nav|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Release|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMO|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.RFMOT|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.SrF|x86.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|Any CPU.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|x64.ActiveCfg = Release|Any CPU + {699D21D2-55DB-4A38-B091-BCC1883065AA}.Sympathetic|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Buffer|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.BufferClassic|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.CaF|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|Any CPU.Build.0 = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|x64.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Decelerator|x86.ActiveCfg = Debug|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDM|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|Mixed Platforms.ActiveCfg = Nav|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|Mixed Platforms.Build.0 = Nav|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Nav|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Release|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMO|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.RFMOT|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.SrF|x86.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|Any CPU.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|x64.ActiveCfg = Release|Any CPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3}.Sympathetic|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.AnritsuVNA|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Buffer|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.BufferClassic|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.CaF|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|x64.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Debug|x86.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|Any CPU.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|Any CPU.Build.0 = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|Mixed Platforms.Build.0 = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|x64.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Decelerator|x86.ActiveCfg = Debug|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDM|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.EDMAnalysis|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Nav|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Release|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMO|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.RFMOT|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.SrF|x86.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|Any CPU.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|Any CPU.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|Mixed Platforms.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|Mixed Platforms.Build.0 = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|x64.ActiveCfg = Release|Any CPU + {A377A708-96B9-4569-BC22-0187D647611E}.Sympathetic|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ICEBLOCTest/DCSTests.cs b/ICEBLOCTest/DCSTests.cs new file mode 100644 index 00000000..d43831f8 --- /dev/null +++ b/ICEBLOCTest/DCSTests.cs @@ -0,0 +1,64 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Collections.Generic; +using DAQ.HAL; + +namespace ICEBLOCTest +{ + [TestClass] + public class DCSTests + { + [TestMethod] + public void TestMessageSerialization() + { + Dictionary parameters = new Dictionary(); + ICEBLOCCommunicator ice = new ICEBLOCCommunicator("192.168.1.237",1024); + parameters["ip_address"] = "192.168.1.100"; + int[] transmission_id = {999}; + string op = "start_link"; + ICEBLOCMessage message = new ICEBLOCMessage(op, transmission_id, parameters); + String json = ice.CreateJsonMessage(message); + Console.WriteLine(json); + ICEBLOCMessage message2 = ice.CreateICEBLOCMessage(json); + Console.WriteLine(message2); + } + + [TestMethod] + public void TestDCSLink() + { + DCSController dcs = new DCSController("192.168.1.237", 1024); + dcs.StartLink(); + dcs.Disable(); + } + + [TestMethod] + public void TestPLLLink() + { + PLLController pll = new PLLController("192.168.1.228", 1024); + pll.StartLink(); + pll.Disable(); + } + + [TestMethod] + public void TestPLLFrequency() + { + PLLController pll = new PLLController("192.168.1.228", 1024); + pll.StartLink(); + pll.UnlockMainLock(); + pll.SetBeatFrequency(6.834862000); + pll.LockMainLock(); + Console.WriteLine("Set PLL frequency to 6.834682 GHz"); + pll.UnlockMainLock(); + pll.SetBeatFrequency(6.834864000); + pll.LockMainLock(); + Console.WriteLine("Set PLL frequency to 6.834882 GHz"); + pll.UnlockMainLock(); + pll.SetBeatFrequency(6.834884000); + pll.LockMainLock(); + pll.Disable(); + + } + + + } +} diff --git a/ICEBLOCTest/ICEBLOCTest.csproj b/ICEBLOCTest/ICEBLOCTest.csproj new file mode 100644 index 00000000..c6111680 --- /dev/null +++ b/ICEBLOCTest/ICEBLOCTest.csproj @@ -0,0 +1,109 @@ + + + + Debug + AnyCPU + {ED7BD5BA-7F85-4F26-9B84-A258269B60E3} + Exe + Properties + ICEBLOCTest + ICEBLOCTest + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + bin\Nav\ + + + pdbonly + true + + + + + + + + + ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + {bb737b99-2e9f-40c9-9809-895a7c51ad40} + DAQ + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + \ No newline at end of file diff --git a/ICEBLOCTest/ICEBloc.cs b/ICEBLOCTest/ICEBloc.cs new file mode 100644 index 00000000..44cbbfe4 --- /dev/null +++ b/ICEBLOCTest/ICEBloc.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using DAQ.HAL; +using NationalInstruments.VisaNS; + +namespace ICEBLOCTest +{ + class ICEBloc + { + static void Main(string[] args) + { + Console.WriteLine("Connecting to ICE-BLOC PLL..."); + PLLController pll; + try + { + pll = new PLLController("192.168.1.228", 1024); + pll.StartLink(); + } + catch (Exception e) + { + Console.WriteLine("Could not connect to PLL:" + e.Message); + return; + } + Console.WriteLine("Connected successfully!"); + Console.WriteLine("Wait for Values from Serial Port? [y/n]:"); + if (Console.ReadLine() == "y") + { + SerialSession comm = new SerialSession("ASRL22::INSTR"); + + Console.WriteLine("Listening on COM22"); + while (true) + { + try + { + String response = comm.ReadString(); + Console.WriteLine("Setting PLL to " + response); + double ddsValue = Double.Parse(response); + pll.UnlockMainLock(); + pll.SetBeatFrequency(ddsValue); + pll.LockMainLock(); + } + catch + { + + } + + } + + } + else + { + Console.WriteLine("Enter DDS Frequency in GHz:"); + double ddsValue = Double.Parse(Console.ReadLine()); + try + { + pll.SetBeatFrequency(ddsValue); + } + catch + { + Console.WriteLine("Could not set DDS Frequency"); + } + + } + pll.Disable(); + + + } + } +} diff --git a/ICEBLOCTest/Properties/AssemblyInfo.cs b/ICEBLOCTest/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..ea51e06b --- /dev/null +++ b/ICEBLOCTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ICEBLOCTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ICEBLOCTest")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d2291de2-3f5a-4ed1-89a4-751eb2e8842b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ICEBLOCTest/packages.config b/ICEBLOCTest/packages.config new file mode 100644 index 00000000..d73e3955 --- /dev/null +++ b/ICEBLOCTest/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/IMAQ/CameraController.cs b/IMAQ/CameraController.cs index 27bc1d2f..4ba63d4c 100644 --- a/IMAQ/CameraController.cs +++ b/IMAQ/CameraController.cs @@ -1,539 +1,676 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; -using System.Runtime.Remoting.Lifetime; -using System.Windows.Forms; -using System.Diagnostics; -using System.Windows.Media; -using System.Windows.Media.Imaging; - - -using DAQ.HAL; -using DAQ.Environment; - -using NationalInstruments; -using NationalInstruments.Vision; -using NationalInstruments.Vision.Acquisition.Imaqdx; -using NationalInstruments.Vision.Internal; -using NationalInstruments.Vision.WindowsForms.Internal; -//using NationalInstruments.Vision.Common; - - -namespace IMAQ -{ - /// - /// This keeps track of everything to do with images. It has 3 sections: - /// -the form (to display the image) - /// -an IMAQdxSession (the class which controls the camera) - /// -a VisionImage (the class that deals with image data) - /// You can now build this into a hardware controller and it knows how to use a camera! - /// The hardware controller doesn't really need to know anything about IMAQ anymore. - /// - public class CameraController - { - #region Setup - public VisionImage image; - public enum CameraState { FREE, BUSY, READY_FOR_ACQUISITION, STREAMING, ACQUISITION_TERMINATED }; - private CameraState state = new CameraState(); - private object streamStopLock = new object(); - public List imageList = new List(); - public bool analyse = false; - private double max = 0; - - - public CameraController(string cameraName) - { - this.cameraName = cameraName; - windowShowing = false; - image = new VisionImage(); - state = CameraState.FREE; - } - #endregion - - #region ImageController functions (Public stuff) - - public void Initialize() - { - try - { - initializeCamera(); - openViewerWindow(); - } - catch { } - - } - - public void Dispose() - { - imaqdxSession.Dispose(); - closeViewerWindow(); - } - - public bool Stream(string cameraAttributesFilePath) - { - SetCameraAttributes(cameraAttributesFilePath); - imageWindow.WriteToConsole("Applied camera attributes from " + cameraAttributesFilePath); - imageWindow.WriteToConsole("Streaming from camera"); - if (state == CameraState.FREE) - { - state = CameraState.STREAMING; - Thread streamThread = new Thread(new ThreadStart(stream)); - streamThread.Start(); - return true; - } - else - { - return false; - } - } - - public void StopStream() - { - if (state == CameraState.STREAMING) - { - state = CameraState.BUSY; - } - imageWindow.WriteToConsole("Streaming stopped"); - } - - public byte[,] SingleSnapshot(string attributesPath) - { - return SingleSnapshot(attributesPath, false); - } - - public byte[,] SingleSnapshot(string attributesPath, bool addToImageList) - { - imageWindow.WriteToConsole("Taking snapshot"); - imageWindow.WriteToConsole("Applied camera attributes from " + attributesPath); - SetCameraAttributes(attributesPath); - try - { - - if (state == CameraState.FREE || state == CameraState.READY_FOR_ACQUISITION) - { - image = new VisionImage(); - - state = CameraState.READY_FOR_ACQUISITION; - try - { - imaqdxSession.Snap(image); - - if (windowShowing) - { - imageWindow.AttachToViewer(image); - - } - if (addToImageList) - { - imageList.Add(image); - } - image.WriteFile("test.bmp"); - - PixelValue2D pval = image.ImageToArray(); - byte[,] u8array = Getthearray.convertToU8(pval.Rgb32); - double max = Getthearray.Findthemaximum(u8array); - imageWindow.WriteToConsole(max.ToString("F6")); - state = CameraState.FREE; - return u8array; - } - catch (ObjectDisposedException e) - { - MessageBox.Show(e.Message); - throw new ObjectDisposedException(""); - } - catch (ImaqdxException e) - { - MessageBox.Show(e.Message); - throw new ImaqdxException(); - } - catch (VisionException e) - { - MessageBox.Show(e.VisionErrorText); - throw e; - } - } - else return null; - - } - catch (TimeoutException) - { - return null; - } - } - - - - public byte[][,] MultipleSnapshot(string attributesPath, int numberOfShots) - { - SetCameraAttributes(attributesPath); - VisionImage[] images = new VisionImage[numberOfShots]; - Stopwatch watch = new Stopwatch(); - try - { - - watch.Start(); - state = CameraState.READY_FOR_ACQUISITION; - - - imaqdxSession.Sequence(images, numberOfShots); - watch.Stop(); - if (windowShowing) - { - long interval = watch.ElapsedMilliseconds; - imageWindow.WriteToConsole(interval.ToString()); - } - - List byteList = new List(); - foreach (VisionImage i in images) - { - byteList.Add((i.ImageToArray()).U8); - - // if (windowShowing) - //{ - // imageWindow.AttachToViewer(i); - - // } - - } - state = CameraState.FREE; - - return byteList.ToArray(); - - - } - catch (ImaqdxException e) - { - MessageBox.Show(e.Message); - state = CameraState.FREE; - throw new TimeoutException(); - } - - } - - public bool IsReadyForAcqisition() - { - if (state == CameraState.READY_FOR_ACQUISITION) - { - return true; - } - else - { - return false; - } - } - - public bool IsCameraFree() - { - if (state == CameraState.FREE) - { - return true; - } - else - { - return false; - } - } - - public void PrintCameraAttributesToConsole() - { - imageWindow.WriteToConsole(imaqdxSession.Attributes.WriteAttributesToString()); - imageWindow.WriteToConsole("Attributes loaded in camera:"); - } - - public string SetCameraAttributes(string newPath) - { - lock (this) - { - imaqdxSession.Attributes.ReadAttributesFromFile(newPath); - } - return newPath; - } - - #endregion - - #region imaqdxSession (Camera Control. Should be all private) - - private string cameraName; - private ImaqdxSession imaqdxSession; - - private void initializeCamera() - { - try - { - imaqdxSession = new ImaqdxSession(cameraName); - } - catch (ImaqdxException e) - { - MessageBox.Show(e.Message); - throw new ImaqdxException(); - } - - } - - private void Getthemaximum() - { - PixelValue2D pval = image.ImageToArray(); - byte[,] u8array = Getthearray.convertToU8(pval.Rgb32); - - } - - private void stream() - { - image = new VisionImage(); - try - { - imaqdxSession.ConfigureGrab(); - } - catch (ObjectDisposedException e) - { - MessageBox.Show(e.Message); - return; - } - for (; ; ) - { - lock (streamStopLock) - { - try - { - imaqdxSession.Grab(image, true); - if (analyse) - { - PixelValue2D pval = image.ImageToArray(); - byte[,] u8array = Getthearray.convertToU8(pval.Rgb32); - max = Getthearray.Findthemaximum(u8array); - imageWindow.WriteToConsole(max.ToString("F6")); - - } - } - catch (InvalidOperationException e) - { - MessageBox.Show("Something bad happened. Stopping the image stream.\n" + e.Message); - state = CameraState.FREE; - return; - } - try - { - if (windowShowing) - { - imageWindow.AttachToViewer(image); - } - } - catch (InvalidOperationException e) - { - MessageBox.Show("I have a leftover image without anywhere to display it. Dumping...\n\n" + e.Message); - imaqdxSession.Acquisition.Stop(); - state = CameraState.FREE; - return; - } - if (state != CameraState.STREAMING) - { - imaqdxSession.Acquisition.Stop(); - state = CameraState.FREE; - return; - } - } - } - } - - #endregion - - #region Image Viewer (also private) - - private ImageViewerWindow imageWindow; - bool windowShowing; - - private void openViewerWindow() - { - if (!windowShowing) - { - imageWindow = new ImageViewerWindow(); - imageWindow.IM = this; - imageWindow.Show(); - windowShowing = true; - } - } - - private void closeViewerWindow() - { - if (windowShowing) - { - windowShowing = false; - } - } - - #endregion - - #region Saving images (Public functions) - // Saving the image - public void SaveImageWithDialog() - { - SaveFileDialog saveFileDialog1 = new SaveFileDialog(); - saveFileDialog1.Filter = "shc images|*.png"; - saveFileDialog1.Title = "Save Image"; - String dataPath = (string)Environs.FileSystem.Paths["dataPath"]; - String dataStoreDir = dataPath + "Single Images"; - saveFileDialog1.InitialDirectory = dataStoreDir; - if (saveFileDialog1.ShowDialog() == DialogResult.OK) - { - if (saveFileDialog1.FileName != "") - { - SaveImage(saveFileDialog1.FileName); - } - } - } - - - - public string GetSaveDialogFilename() - { - string file = ""; - { - SaveFileDialog saveFileDialog1 = new SaveFileDialog(); - saveFileDialog1.Title = "Save image data"; - - if (saveFileDialog1.ShowDialog() == DialogResult.OK) - { - if (saveFileDialog1.FileName != "") - { - file = saveFileDialog1.FileName; - } - } - } - return file; - } - - public void StoreImageListWithDialog() - { - string filepath = GetSaveDialogFilename(); - string filetext = Path.GetFileName(filepath); - Directory.CreateDirectory(filepath); - string filed = filepath+"\\"+filetext; - StoreImageList(filed); - imageWindow.WriteToConsole(filed); - } - - - - // Quietly. - public void SaveImage() - { - String dataPath = (string)Environs.FileSystem.Paths["dataPath"]; - String dataStoreFilePath = dataPath + "\\Single Images\\tempImage.png"; - SaveImage(dataStoreFilePath); - } - - - - public void SaveImage(String dataStoreFilePath) - { - image.WritePngFile(dataStoreFilePath); - imageWindow.WriteToConsole("Image saved"); - } - - //public void storeImage(string savePath, byte[][,] imageData) - //{ - // for (int i = 0; i < imageData.Length; i++) - // { - // storeImage(savePath + "_" + i.ToString(), imageData[i]); - // } - // imageWindow.WriteToConsole("Imagedata saved"); - //} - - //public void storeImage(string savePath, byte[,] imageData) - //{ - // int width = imageData.GetLength(1); - // int height = imageData.GetLength(0); - // byte[] pixels = new byte[width * height]; - // for (int j = 0; j < height; j++) - // { - // for (int i = 0; i < width; i++) - // { - // pixels[(width * j) + i] = imageData[j, i]; - // } - // } - // // Define the image palette - // BitmapPalette myPalette = BitmapPalettes.Gray256Transparent; - - // // Creates a new empty image with the pre-defined palette - - // BitmapSource image = BitmapSource.Create( - // width, - // height, - // 96, - // 96, - // PixelFormats.Indexed8, - // myPalette, - // pixels, - // width); - - // FileStream stream = new FileStream(savePath + ".dat", FileMode.Create); - // stream.Write(pixels, 0, width * height); - - // PngBitmapEncoder encoder = new PngBitmapEncoder(); - // encoder.Interlace = PngInterlaceOption.On; - // encoder.Frames.Add(BitmapFrame.Create(image)); - // encoder.Save(stream); - - // stream.Dispose(); - - //} - - - - - - - public void StoreImageList(string savePath) - { - - for (int i = 0; i < imageList.Count; i++) - { - PixelValue2D pval = imageList[i].ImageToArray(); - StoreImageData(savePath+"_" + i.ToString(), pval.U8); - } - imageWindow.WriteToConsole("List of"+ imageList.Count.ToString() +"images saved"); - } - - public void StoreImageData(string savePath, byte[,] imageData) - { - int width = imageData.GetLength(1); - int height = imageData.GetLength(0); - byte[] pixels = new byte[width * height]; - for (int j = 0; j < height; j++) - { - for (int i = 0; i < width; i++) - { - pixels[(width * j) + i] = imageData[j, i]; - } - } - - - FileStream stream = new FileStream(savePath + ".dat", FileMode.Create); - stream.Write(pixels,0,width*height); - stream.Dispose(); - - } - - - - public void DisposeImages() - { - imageList.Clear(); - - } - - - - - - - - //Load image when opening the controller - - #endregion - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using System.Threading; +using System.Runtime.Remoting.Lifetime; +using System.Windows.Forms; +using System.Diagnostics; +using System.Windows.Media; +using System.Windows.Media.Imaging; + + +using DAQ.HAL; +using DAQ.Environment; + +using NationalInstruments; +using NationalInstruments.Vision; +using NationalInstruments.Vision.Acquisition.Imaqdx; +using NationalInstruments.Vision.Internal; +using NationalInstruments.Vision.WindowsForms.Internal; + + + +namespace IMAQ +{ + /// + /// This keeps track of everything to do with images. It has 3 sections: + /// -the form (to display the image) + /// -an IMAQdxSession (the class which controls the camera) + /// -a VisionImage (the class that deals with image data) + /// You can now build this into a hardware controller and it knows how to use a camera! + /// The hardware controller doesn't really need to know anything about IMAQ anymore. + /// + public class CameraController + { + #region Setup + public VisionImage image; + public enum CameraState { FREE, BUSY, READY_FOR_ACQUISITION, STREAMING, ACQUISITION_TERMINATED }; + private CameraState state = new CameraState(); + private object streamStopLock = new object(); + public List imageList = new List(); + public bool analyse = false; + public double max = 0.0; + public ImaqdxAttributeCollection attributes; + public PointContour pointOfInterest; + public Roi rectangleROI = new Roi(); + public Roi pointROI = new Roi(); + public bool roiSet = false; + + public CameraController(string cameraName) + { + this.cameraName = cameraName; + windowShowing = false; + image = new VisionImage(); + state = CameraState.FREE; + } + #endregion + + public void copyContoursToViewerROI() + { + try + { + Contour rectContour = rectangleROI.GetContour(0); + rectContour.CopyTo(imageWindow.imageViewer.Roi); + } + catch + { + + } + + try + { + Contour pointContour = pointROI.GetContour(0); + pointContour.CopyTo(imageWindow.imageViewer.Roi); + } + catch + { + + } + } + + //public void addLineContoursToROI(LineContour line1, LineContour line2) + //{ + // Contour line1Contour = new Contour(line1); + // Contour line2Contour = new Contour(line2); + // line1Contour.CopyTo(imageWindow.imageViewer.Roi); + // line2Contour.CopyTo(imageWindow.imageViewer.Roi); + //} + + #region ImageController functions (Public stuff) + + public void Initialize() + { + try + { + initializeCamera(); + openViewerWindow(); + } + catch { } + + } + + public void Dispose() + { + if (state == CameraState.STREAMING) { StopStream(); } + imaqdxSession.Dispose(); + closeViewerWindow(); + } + + public bool Stream(string cameraAttributesFilePath) + { + SetCameraAttributes(cameraAttributesFilePath); + imageWindow.WriteToConsole("Applied camera attributes from " + cameraAttributesFilePath); + imageWindow.WriteToConsole("Streaming from camera"); + if (state == CameraState.FREE) + { + state = CameraState.STREAMING; + Thread streamThread = new Thread(new ThreadStart(stream)); + streamThread.Start(); + return true; + } + else + { + return false; + } + } + + public void StopStream() + { + if (state == CameraState.STREAMING) + { + state = CameraState.BUSY; + } + imageWindow.WriteToConsole("Streaming stopped"); + } + + public byte[,] SingleSnapshot(string attributesPath) + { + return SingleSnapshot(attributesPath, false); + } + + public byte[,] SingleSnapshot(string attributesPath, bool addToImageList) + { + imageWindow.WriteToConsole("Taking snapshot"); + imageWindow.WriteToConsole("Applied camera attributes from " + attributesPath); + SetCameraAttributes(attributesPath); + try + { + + if (state == CameraState.FREE || state == CameraState.READY_FOR_ACQUISITION) + { + image = new VisionImage(); + + state = CameraState.READY_FOR_ACQUISITION; + try + { + imaqdxSession.Snap(image); + + if (windowShowing) + { + imageWindow.AttachToViewer(image); + + } + if (addToImageList) + { + imageList.Add(image); + } + image.WriteFile("test.bmp"); + + PixelValue2D pval = image.ImageToArray(); + byte[,] u8array = Getthearray.convertToU8(pval.Rgb32); + double max = Getthearray.Findthemaximum(u8array); + imageWindow.WriteToConsole(max.ToString("F6")); + state = CameraState.FREE; + return u8array; + } + catch (ObjectDisposedException e) + { + MessageBox.Show(e.Message); + throw new ObjectDisposedException(""); + } + catch (ImaqdxException e) + { + MessageBox.Show(e.Message); + throw new ImaqdxException(); + } + catch (VisionException e) + { + MessageBox.Show(e.VisionErrorText); + throw e; + } + } + else return null; + + } + catch (TimeoutException) + { + return null; + } + } + + + + public byte[][,] MultipleSnapshot(string attributesPath, int numberOfShots) + { + SetCameraAttributes(attributesPath); + VisionImage[] images = new VisionImage[numberOfShots]; + Stopwatch watch = new Stopwatch(); + try + { + + watch.Start(); + state = CameraState.READY_FOR_ACQUISITION; + + + imaqdxSession.Sequence(images, numberOfShots); + watch.Stop(); + if (windowShowing) + { + long interval = watch.ElapsedMilliseconds; + imageWindow.WriteToConsole(interval.ToString()); + } + + List byteList = new List(); + foreach (VisionImage i in images) + { + byteList.Add((i.ImageToArray()).U8); + + // if (windowShowing) + //{ + // imageWindow.AttachToViewer(i); + + // } + + } + state = CameraState.FREE; + + return byteList.ToArray(); + + + } + catch (ImaqdxException e) + { + MessageBox.Show(e.Message); + state = CameraState.FREE; + throw new TimeoutException(); + } + + } + public void ShowSubtractedImage(byte[,] fgImage, byte[,] bgImage) + { + + int height = fgImage.GetLength(0); + int width = fgImage.GetLength(1); + byte[,] subImage = new byte[height, width]; + if (fgImage.Length != bgImage.Length) + { + throw new Exception("Images not the same size"); + } + for (int i=0;i 3) - { - temp = (double)U8array[i, j] + temp; - } - } - arrayToReturn[i] = temp; - - } - return arrayToReturn; - - } - - public static double Findthemaximum(byte[,] U8array) - { - double max = 0; - for (int i=0; i 3) + { + temp = (double)U8array[i, j] + temp; + } + } + arrayToReturn[i] = temp; + + } + return arrayToReturn; + + } + + public static double Findthemaximum(byte[,] U8array) + { + double max = 0; + for (int i=0; i - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {FCE9FC5D-8BC1-4517-B4F6-AA446831A930} - Library - Properties - IMAQ - IMAQ - v4.5 - 512 - - - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - bin\Decelerator\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\BufferClassic\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - full - true - - - bin\EDMTestCrate\ - - - - ..\..\..\..\..\Emgu\emgucv-windesktop 3.1.0.2282\bin\Emgu.CV.DebuggerVisualizers.VS2013.dll - - - ..\..\..\..\..\Emgu\emgucv-windesktop 3.1.0.2282\bin\Emgu.CV.UI.dll - - - ..\..\..\..\..\Emgu\emgucv-windesktop 3.1.0.2282\bin\Emgu.CV.UI.GL.dll - - - ..\..\..\..\..\Emgu\emgucv-windesktop 3.1.0.2282\bin\Emgu.CV.World.dll - - - - - - - False - ..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\13.0.35.190\NationalInstruments.Common.dll - - - - - - - - - - - False - - - - - False - C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.dll - - - False - C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current\NationalInstruments.UI.WindowsForms.dll - - - - - - False - ..\..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\Current\NationalInstruments.Vision.Common.dll - - - - - - 3.5 - - - - - - - - - - - Form - - - ImageViewerWindow.cs - - - - - - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - DAQ - - - - - ImageViewerWindow.cs - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930} + Library + Properties + IMAQ + IMAQ + v4.5 + 512 + + + + + 3.5 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\Wavemeter\ + full + true + + + true + bin\x64\BufferClassic\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\CaF\ + x64 + MinimumRecommendedRules.ruleset + + + true + bin\Nav\ + full + true + MinimumRecommendedRules.ruleset + + + + + + + + + + + False + ..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies (64-bit)\Current\NationalInstruments.DAQmx.dll + + + + + + False + + + + + + False + C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.UI.WindowsForms.dll + + + + + + + + + + + 3.5 + + + + + + + + + + + Form + + + ImageViewerWindow.cs + + + + + + ImageViewerWindow.cs + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + {bb737b99-2e9f-40c9-9809-895a7c51ad40} + DAQ + + + + \ No newline at end of file diff --git a/IMAQ/ImageViewerWindow.Designer.cs b/IMAQ/ImageViewerWindow.Designer.cs index 8b5887dc..96eceaa9 100644 --- a/IMAQ/ImageViewerWindow.Designer.cs +++ b/IMAQ/ImageViewerWindow.Designer.cs @@ -1,93 +1,93 @@ -namespace IMAQ -{ - partial class ImageViewerWindow - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.imageViewer = new NationalInstruments.Vision.WindowsForms.ImageViewer(); - this.consoleRichTextBox = new System.Windows.Forms.RichTextBox(); - this.hScrollBar = new System.Windows.Forms.HScrollBar(); - this.SuspendLayout(); - // - // imageViewer - // - this.imageViewer.ActiveTool = NationalInstruments.Vision.WindowsForms.ViewerTools.ZoomIn; - this.imageViewer.AutoSize = true; - this.imageViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.imageViewer.Location = new System.Drawing.Point(-2, 0); - this.imageViewer.Name = "imageViewer"; - this.imageViewer.Size = new System.Drawing.Size(793, 442); - this.imageViewer.TabIndex = 0; - this.imageViewer.ZoomToFit = true; - this.imageViewer.RoiChanged += new System.EventHandler(this.imageViewer_RoiChanged); - // - // consoleRichTextBox - // - this.consoleRichTextBox.BackColor = System.Drawing.Color.Black; - this.consoleRichTextBox.ForeColor = System.Drawing.Color.Lime; - this.consoleRichTextBox.Location = new System.Drawing.Point(0, 448); - this.consoleRichTextBox.Name = "consoleRichTextBox"; - this.consoleRichTextBox.ReadOnly = true; - this.consoleRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; - this.consoleRichTextBox.Size = new System.Drawing.Size(791, 201); - this.consoleRichTextBox.TabIndex = 24; - this.consoleRichTextBox.Text = ""; - this.consoleRichTextBox.TextChanged += new System.EventHandler(this.consoleRichTextBox_TextChanged); - // - // hScrollBar - // - this.hScrollBar.Location = new System.Drawing.Point(0, 425); - this.hScrollBar.Name = "hScrollBar"; - this.hScrollBar.Size = new System.Drawing.Size(791, 17); - this.hScrollBar.TabIndex = 25; - this.hScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar_Scroll); - // - // ImageViewerWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(793, 647); - this.Controls.Add(this.hScrollBar); - this.Controls.Add(this.consoleRichTextBox); - this.Controls.Add(this.imageViewer); - this.Name = "ImageViewerWindow"; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "Image"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ImageViewerWindow_FormClosing); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - public NationalInstruments.Vision.WindowsForms.ImageViewer imageViewer; - private System.Windows.Forms.RichTextBox consoleRichTextBox; - private System.Windows.Forms.HScrollBar hScrollBar; - } +namespace IMAQ +{ + partial class ImageViewerWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.imageViewer = new NationalInstruments.Vision.WindowsForms.ImageViewer(); + this.consoleRichTextBox = new System.Windows.Forms.RichTextBox(); + this.hScrollBar = new System.Windows.Forms.HScrollBar(); + this.SuspendLayout(); + // + // imageViewer + // + this.imageViewer.ActiveTool = NationalInstruments.Vision.WindowsForms.ViewerTools.ZoomIn; + this.imageViewer.AutoSize = true; + this.imageViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.imageViewer.Location = new System.Drawing.Point(-2, 0); + this.imageViewer.Name = "imageViewer"; + this.imageViewer.ShowScrollbars = true; + this.imageViewer.Size = new System.Drawing.Size(793, 433); + this.imageViewer.TabIndex = 0; + this.imageViewer.ZoomToFit = true; + this.imageViewer.RoiChanged += new System.EventHandler(this.imageViewer_RoiChanged); + // + // consoleRichTextBox + // + this.consoleRichTextBox.BackColor = System.Drawing.Color.Black; + this.consoleRichTextBox.ForeColor = System.Drawing.Color.Lime; + this.consoleRichTextBox.Location = new System.Drawing.Point(-2, 430); + this.consoleRichTextBox.Name = "consoleRichTextBox"; + this.consoleRichTextBox.ReadOnly = true; + this.consoleRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; + this.consoleRichTextBox.Size = new System.Drawing.Size(793, 185); + this.consoleRichTextBox.TabIndex = 24; + this.consoleRichTextBox.Text = ""; + this.consoleRichTextBox.TextChanged += new System.EventHandler(this.consoleRichTextBox_TextChanged); + // + // hScrollBar + // + this.hScrollBar.Location = new System.Drawing.Point(0, 425); + this.hScrollBar.Name = "hScrollBar"; + this.hScrollBar.Size = new System.Drawing.Size(791, 17); + this.hScrollBar.TabIndex = 25; + this.hScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.hScrollBar_Scroll); + // + // ImageViewerWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.ClientSize = new System.Drawing.Size(790, 612); + this.Controls.Add(this.consoleRichTextBox); + this.Controls.Add(this.imageViewer); + this.Name = "ImageViewerWindow"; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Image"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ImageViewerWindow_FormClosing); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + public NationalInstruments.Vision.WindowsForms.ImageViewer imageViewer; + private System.Windows.Forms.RichTextBox consoleRichTextBox; + private System.Windows.Forms.HScrollBar hScrollBar; + } } \ No newline at end of file diff --git a/IMAQ/ImageViewerWindow.cs b/IMAQ/ImageViewerWindow.cs index 6eab513d..5ca0c4a2 100644 --- a/IMAQ/ImageViewerWindow.cs +++ b/IMAQ/ImageViewerWindow.cs @@ -1,148 +1,205 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using NationalInstruments.UI.WindowsForms; -using NationalInstruments.UI; - -using NationalInstruments.Vision; -using NationalInstruments.Vision.Acquisition.Imaqdx; -using NationalInstruments.Vision.Internal; -using NationalInstruments.Vision.WindowsForms.Internal; - -namespace IMAQ -{ - public partial class ImageViewerWindow : Form - { - public CameraController IM; - - public ImageViewerWindow() - { - InitializeComponent(); - } - - - #region ThreadSafe wrappers - - //An irritating number of threadsafe delegates for the viewer controlWindow. - private void attachToViewer(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image) - { - viewer.Invoke(new AttachImageToViewerDelegate(AttachImageHelper), new object[] { viewer, image }); - } - - private delegate void AttachImageToViewerDelegate(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image); - private void AttachImageHelper(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image) - { - viewer.Attach(image); - - } - private void setRichTextBox(RichTextBox box, string text) - { - box.Invoke(new setRichTextDelegate(setRichTextHelper), new object[] { box, text }); - } - private delegate void setRichTextDelegate(RichTextBox box, string text); - private void setRichTextHelper(RichTextBox box, string text) - { - box.AppendText(text); - consoleRichTextBox.ScrollToCaret(); - } - - #endregion - - #region Public methods - - public void AttachToViewer(VisionImage image) - { - attachToViewer(imageViewer, image); - } - - private VisionImage disImage =new VisionImage(); - public void AttachImagesToViewer(List images, int frame) - { - - disImage=images[frame]; - attachToViewer(imageViewer, disImage); - - - } - - /* - public VisionImage Image - { - get - { - return imageViewer.Image; - } - set - { - attachToViewer(imageViewer, value); - } - }*/ - public void WriteToConsole(string text) - { - setRichTextBox(consoleRichTextBox, ">> " + text + "\n"); - - } - #endregion - - private void ImageViewerWindow_FormClosing(object sender, FormClosingEventArgs e) - { - IM.Dispose(); - } - - private void hScrollBar_Change(int newScrollValue) - { - AttachImagesToViewer(IM.imageList, newScrollValue); - - hScrollBar.Maximum = IM.imageList.Count-1; - - } - - - - private void hScrollBar_Scroll(object sender, ScrollEventArgs e) - { - - if(IM.imageList.Count == 0) - - { - hScrollBar.Update(); - hScrollBar.Maximum = 1; - - - } - - - else - { - - hScrollBar_Change(e.NewValue); - } - - - - } - - private void imageViewer_RoiChanged(object sender, NationalInstruments.Vision.WindowsForms.ContoursChangedEventArgs e) - { - - } - - private void consoleRichTextBox_TextChanged(object sender, EventArgs e) - { - - } - - - - - - - - - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using NationalInstruments.UI.WindowsForms; +using NationalInstruments.UI; + +using NationalInstruments.Vision; +using NationalInstruments.Vision.Acquisition.Imaqdx; +using NationalInstruments.Vision.Internal; +using NationalInstruments.Vision.WindowsForms.Internal; +using NationalInstruments.Vision.WindowsForms; +using NationalInstruments; + +namespace IMAQ +{ + public partial class ImageViewerWindow : Form + { + public CameraController IM; + + public ImageViewerWindow() + { + InitializeComponent(); + imageViewer.ImageMouseDown += displayPointClicked; + imageViewer.ShowToolbar = true; + //imageViewer.RoiChanged += newRoi; + //imageViewer.Conto + } + + + #region ThreadSafe wrappers + + //An irritating number of threadsafe delegates for the viewer controlWindow. + + private void imageViewer_RoiChanged(object sender, ContoursChangedEventArgs e) + { + if (e.Action == ContoursChangedAction.Add && imageViewer.ActiveTool == ViewerTools.Point) + { + if (IM.pointROI.Count == 0) + { + e.NewItems[0].CopyTo(IM.pointROI); + } + else + { + IM.pointROI.RemoveAt(0); + e.NewItems[0].CopyTo(IM.pointROI); + } + } + if (e.Action == ContoursChangedAction.Add && imageViewer.ActiveTool == ViewerTools.Rectangle) + { + if (IM.rectangleROI.Count == 0) + { + e.NewItems[0].CopyTo(IM.rectangleROI); + } + else + { + IM.rectangleROI.RemoveAt(0); + e.NewItems[0].CopyTo(IM.rectangleROI); + } + } + if (e.Action == ContoursChangedAction.Add) + { + IM.copyContoursToViewerROI(); + } + } + + private void displayPointClicked(object sender, ImageMouseEventArgs e) + { + if (e.Button == System.Windows.Forms.MouseButtons.Right && IM.IsCameraFree()) + { + + if (!IM.roiSet) + { + IM.SetROI(); + WriteToConsole("Setting new Region of Interest"); + } + else + { + IM.ClearROI(2452, 2054); + WriteToConsole("Clearing Region of Interest"); + } + + } + PointContour point = e.Point; + IM.pointOfInterest = e.Point; + + } + + + + private void attachToViewer(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image) + { + viewer.Invoke(new AttachImageToViewerDelegate(AttachImageHelper), new object[] { viewer, image }); + } + + private delegate void AttachImageToViewerDelegate(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image); + private void AttachImageHelper(NationalInstruments.Vision.WindowsForms.ImageViewer viewer, VisionImage image) + { + viewer.Attach(image); + + } + private void setRichTextBox(RichTextBox box, string text) + { + box.Invoke(new setRichTextDelegate(setRichTextHelper), new object[] { box, text }); + } + private delegate void setRichTextDelegate(RichTextBox box, string text); + private void setRichTextHelper(RichTextBox box, string text) + { + box.AppendText(text); + consoleRichTextBox.ScrollToCaret(); + } + + #endregion + + #region Public methods + + public void AttachToViewer(VisionImage image) + { + attachToViewer(imageViewer, image); + } + + private VisionImage disImage = new VisionImage(); + public void AttachImagesToViewer(List images, int frame) + { + + disImage = images[frame]; + attachToViewer(imageViewer, disImage); + + + } + + /* + public VisionImage Image + { + get + { + return imageViewer.Image; + } + set + { + attachToViewer(imageViewer, value); + } + }*/ + public void WriteToConsole(string text) + { + setRichTextBox(consoleRichTextBox, ">> " + text + "\n"); + + } + #endregion + + private void ImageViewerWindow_FormClosing(object sender, FormClosingEventArgs e) + { + IM.Dispose(); + } + + private void hScrollBar_Change(int newScrollValue) + { + AttachImagesToViewer(IM.imageList, newScrollValue); + + hScrollBar.Maximum = IM.imageList.Count-1; + + } + + + + private void hScrollBar_Scroll(object sender, ScrollEventArgs e) + { + + if (IM.imageList.Count == 0) + { + hScrollBar.Update(); + hScrollBar.Maximum = 1; + + + } + + + else + { + } + } + //private void imageViewer_RoiChanged(object sender, NationalInstruments.Vision.WindowsForms.ContoursChangedEventArgs e) + //{ + + //} + + private void consoleRichTextBox_TextChanged(object sender, EventArgs e) + { + + } + + + + + //} + + + + + } +} diff --git a/IMAQ/ImageViewerWindow.resx b/IMAQ/ImageViewerWindow.resx index d58980a3..c7e0d4bd 100644 --- a/IMAQ/ImageViewerWindow.resx +++ b/IMAQ/ImageViewerWindow.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/InstallationNotes.tex b/InstallationNotes.tex index 8278d822..0bfb39a6 100644 --- a/InstallationNotes.tex +++ b/InstallationNotes.tex @@ -1,144 +1,144 @@ -\documentclass{article} -\usepackage[margin=0.8in]{geometry} -\usepackage[T1]{fontenc} -\usepackage{inconsolata} - -\usepackage{color} -\definecolor{bluekeywords}{rgb}{0.13,0.13,1} -\definecolor{greencomments}{rgb}{0,0.5,0} -\definecolor{redstrings}{rgb}{0.9,0,0} - -\usepackage{listings} -\lstset{language=[Sharp]C, - showspaces=false, - showtabs=false, - breaklines=true, - showstringspaces=false, - breakatwhitespace=true, - escapeinside={(*@}{@*)}, - commentstyle=\color{greencomments}, - keywordstyle=\color{bluekeywords}, - stringstyle=\color{redstrings}, - basicstyle=\ttfamily -} - -\title{Installation notes for EDM Suite } -\author{Jimmy Stammers and Jack Devlin} -\date{13/4/2016} -\newcommand{\cons}[1]{\fontencoding{consola}} -\begin{document} -\maketitle -\section{General Information} -The EDMSuite was originally written to control a molecular beam experiment and over the years has been developed into a more general-purpose control software. The bulk of the code is designed to be independent of hardware, to remove the dependency on build requirements for specific computers. The references to hardware are included in higher-levels of the code. -\section{Installation Instructions} -\subsection{Requirements} -\begin{itemize} -\item Microsoft Visual Studio 2013, install from - -https://imperial.onthehub.com/WebStore/ProductsByMajorVersionList.aspx, sign in with imperial ID -\item National Instruments Measurement Studio 2015, download from NI. License code is in 015, Bay 2 filing cabinet. -\item National Instruments drivers, these depend on the hardware you want to run. Look at the pages on the NI website for the cards that you have. These will definitely include NI-DAQmx. Use the latest version of these drivers. Tested successfully with DAQmx version 15.5.45.109 -\item git, download from https://git-scm.com/ -\item edmSuite - available from http://github.com/coldmatter/EDMSuite -\end{itemize} - -\subsection{Steps for Installation} -\begin{enumerate} -\item Install Visual Studio 2013 -\item Install Measurement Studio 2015 -\item Launch Visual Studio and the edmSuite solution \lstinline|EDMSuite.sln|. When first opening, a dialogue may ask if you would like to automatically update references to newer installed versions. -\item Every project requires a \lstinline|licenses.licx| file, which is generated by measurement studio. This can be done automatically using the generate licenses command in the Measurement Studio tab, but you may need to manually create a blank file in each project folder. -\item Choose the configuration \lstinline|analysis| which does not depend on any hardware. Build this to verify correct installation. -\end{enumerate} -\section{Configuring EDMSuite for the Specific Computer} -\subsection{Defining the Computer as an Environment} -In the \lstinline|DAQ.environs| method add a \lstinline|case| of the following form -\begin{lstlisting} -case "your-computer": - Hardware = new YourHardware(); - FileSystem = new YourFileSystem(); - Debug = false; - break; -\end{lstlisting} -\subsection{Defining the Hardware Class} -\begin{enumerate} -\item Create a new class in the DAQ project \lstinline|YourHardware.cs|. This class requires \lstinline|NationalInstruments.DAQmx| and \lstinline|DAQ.pattern| and is in \lstinline|namespace DAQ.HAL|. The class inherits from \lstinline|DAQ.HAL.Hardware|. DAQ boards are added using -\begin{lstlisting} -Boards.Add("namestring","boardlocation"); -\end{lstlisting} -where \lstinline|"boardlocation" | is the device name in NI-MAX. -\item Define a string for each board, e.g. -\begin{lstlisting} -string boardName = (string)Boards["namestring"]; -\end{lstlisting} -\item Add Digital/Analogue I/O channels, e.g. -\begin{lstlisting} -AddDigitalOutputChannel("name", boardName, portNo, lineNo); -\end{lstlisting} -\item You can look at \lstinline|PXIEDMHardware.cs| for an example -\end{enumerate} -\subsection{Defining the File System} -\begin{enumerate} -\item Create a new class in the DAQ project \lstinline|YourFileSystem.cs|. This class is in \lstinline|namespace DAQ| and inherits from \lstinline|DAQ.Environment.FileSystem|. -\item Paths are added in the following way -\begin{lstlisting} -Paths.Add("yourPath","drive:\\folder\\subfolder") -\end{lstlisting} -\item Add data paths to the \lstinline|DataSearchPaths| object -\begin{lstlisting} -DataSearchPaths.Add(Paths["yourDataPath"]); -\end{lstlisting} -\end{enumerate} -\subsection{Make a new Configuration} -\begin{enumerate} -\item Navigate to the configuration manager -\item Add a new build configuration and select the required projects. This must at least have \lstinline|DAQ|, \lstinline|SharedCode|. -\item Now build this configuration to check that you have all the NI drivers. If there are references that are not found, you may need to download additional drivers. -\end{enumerate} -\section{Controlling your Hardware} -Create a class in DAQ called \lstinline|YourHardwareController.cs|. Set this to be the start-up project. -\subsection{Creating and Modifying Tasks} -\begin{itemize} -\item Each channel must be defined as an object of the type \lstinline|Task|, which is located in \lstinline|NationalInstruments.DAQmx|. These tasks are created using methods of the following form -\begin{lstlisting} - private Task CreateAnalogInputTask(string channel) - { - Task task = new Task("NAVHCIn"+channel); - ((AnalogInputChannel)Environs.Hardware.AnalogInputChannels[channel]).AddToTask( - task, - 0, - 10 - ); - task.Control(TaskAction.Verify); - return task; - } - -\end{lstlisting} -With similar methods for digital and/or output tasks. It may also be useful to define methods which create analogue tasks with a specified range. In the above case, the low value is set to 0 and the high is set to 10. -\item Set methods are defined in a similar way -\begin{lstlisting} - private void SetAnalogOutput(Task task, double voltage) - { - AnalogSingleChannelWriter writer = new AnalogSingleChannelWriter(task.Stream); - writer.WriteSingleSample(true, voltage); - task.Control(TaskAction.Unreserve); - } -\end{lstlisting} -as are read methods -\begin{lstlisting} - private double ReadAnalogInput(Task task) - { - AnalogSingleChannelReader reader = new AnalogSingleChannelReader(task.Stream); - double val = reader.ReadSingleSample(); - task.Control(TaskAction.Unreserve); - return val; - } -\end{lstlisting} -For analogue channels, there is also a method which reads multiple samples at a user-defined sampling rate and returns their mean value. -\item When the digital tasks are created, they are added to Hash tables \lstinline|digitalTasks| or \lstinline|digitalInputTasks|, so these must also be defined -\end{itemize} -\subsection{Configuring the GUI} -In \lstinline|YourHardwareController|, create a method \lstinline|public void Start()|, which is the initialises the hardware controller. All the analogue and digital tasks are created here and the window is created using \lstinline|ControlWindow()|. After this, define methods \lstinline|internal void WindowLoaded()| and \lstinline|internal void WindowClosed()| which run after starting and closing the application respectively. In the controller window, a toolbox can be used to add components such as buttons, text fields and check boxes. As an example, I created a text box named \lstinline|bFieldTextBox| and defined a method in the controller class \lstinline|BFieldCurrent| which parses the value from this text box. A function \lstinline|UpdateBfield()| then outputs this as a voltage to the task \lstinline|bfieldCurrentOutputTask|. This is called in the method \lstinline|button1_Click| found in the \lstinline|ControlWindow| class. In the \lstinline|ControlWindow.Designer|, Visual Studio automatically generates definitions for the various controllable objects. By default these are private, but if they are required by other classes, then they must be redefined as public objects. Before the application can launch, a \lstinline|Runner| class must be written which contains the \lstinline|Main()| sequence that initialises and starts the hardware controller. In here, it is also possible to include remote access control so that the hardware controller can be controlled via other applications through TCP. -\subsection{Including Vision Acquistion} - +\documentclass{article} +\usepackage[margin=0.8in]{geometry} +\usepackage[T1]{fontenc} +\usepackage{inconsolata} + +\usepackage{color} +\definecolor{bluekeywords}{rgb}{0.13,0.13,1} +\definecolor{greencomments}{rgb}{0,0.5,0} +\definecolor{redstrings}{rgb}{0.9,0,0} + +\usepackage{listings} +\lstset{language=[Sharp]C, + showspaces=false, + showtabs=false, + breaklines=true, + showstringspaces=false, + breakatwhitespace=true, + escapeinside={(*@}{@*)}, + commentstyle=\color{greencomments}, + keywordstyle=\color{bluekeywords}, + stringstyle=\color{redstrings}, + basicstyle=\ttfamily +} + +\title{Installation notes for EDM Suite } +\author{Jimmy Stammers and Jack Devlin} +\date{13/4/2016} +\newcommand{\cons}[1]{\fontencoding{consola}} +\begin{document} +\maketitle +\section{General Information} +The EDMSuite was originally written to control a molecular beam experiment and over the years has been developed into a more general-purpose control software. The bulk of the code is designed to be independent of hardware, to remove the dependency on build requirements for specific computers. The references to hardware are included in higher-levels of the code. +\section{Installation Instructions} +\subsection{Requirements} +\begin{itemize} +\item Microsoft Visual Studio 2013, install from + +https://imperial.onthehub.com/WebStore/ProductsByMajorVersionList.aspx, sign in with imperial ID +\item National Instruments Measurement Studio 2015, download from NI. License code is in 015, Bay 2 filing cabinet. +\item National Instruments drivers, these depend on the hardware you want to run. Look at the pages on the NI website for the cards that you have. These will definitely include NI-DAQmx. Use the latest version of these drivers. Tested successfully with DAQmx version 15.5.45.109 +\item git, download from https://git-scm.com/ +\item edmSuite - available from http://github.com/coldmatter/EDMSuite +\end{itemize} + +\subsection{Steps for Installation} +\begin{enumerate} +\item Install Visual Studio 2013 +\item Install Measurement Studio 2015 +\item Launch Visual Studio and the edmSuite solution \lstinline|EDMSuite.sln|. When first opening, a dialogue may ask if you would like to automatically update references to newer installed versions. +\item Every project requires a \lstinline|licenses.licx| file, which is generated by measurement studio. This can be done automatically using the generate licenses command in the Measurement Studio tab, but you may need to manually create a blank file in each project folder. +\item Choose the configuration \lstinline|analysis| which does not depend on any hardware. Build this to verify correct installation. +\end{enumerate} +\section{Configuring EDMSuite for the Specific Computer} +\subsection{Defining the Computer as an Environment} +In the \lstinline|DAQ.environs| method add a \lstinline|case| of the following form +\begin{lstlisting} +case "your-computer": + Hardware = new YourHardware(); + FileSystem = new YourFileSystem(); + Debug = false; + break; +\end{lstlisting} +\subsection{Defining the Hardware Class} +\begin{enumerate} +\item Create a new class in the DAQ project \lstinline|YourHardware.cs|. This class requires \lstinline|NationalInstruments.DAQmx| and \lstinline|DAQ.pattern| and is in \lstinline|namespace DAQ.HAL|. The class inherits from \lstinline|DAQ.HAL.Hardware|. DAQ boards are added using +\begin{lstlisting} +Boards.Add("namestring","boardlocation"); +\end{lstlisting} +where \lstinline|"boardlocation" | is the device name in NI-MAX. +\item Define a string for each board, e.g. +\begin{lstlisting} +string boardName = (string)Boards["namestring"]; +\end{lstlisting} +\item Add Digital/Analogue I/O channels, e.g. +\begin{lstlisting} +AddDigitalOutputChannel("name", boardName, portNo, lineNo); +\end{lstlisting} +\item You can look at \lstinline|PXIEDMHardware.cs| for an example +\end{enumerate} +\subsection{Defining the File System} +\begin{enumerate} +\item Create a new class in the DAQ project \lstinline|YourFileSystem.cs|. This class is in \lstinline|namespace DAQ| and inherits from \lstinline|DAQ.Environment.FileSystem|. +\item Paths are added in the following way +\begin{lstlisting} +Paths.Add("yourPath","drive:\\folder\\subfolder") +\end{lstlisting} +\item Add data paths to the \lstinline|DataSearchPaths| object +\begin{lstlisting} +DataSearchPaths.Add(Paths["yourDataPath"]); +\end{lstlisting} +\end{enumerate} +\subsection{Make a new Configuration} +\begin{enumerate} +\item Navigate to the configuration manager +\item Add a new build configuration and select the required projects. This must at least have \lstinline|DAQ|, \lstinline|SharedCode|. +\item Now build this configuration to check that you have all the NI drivers. If there are references that are not found, you may need to download additional drivers. +\end{enumerate} +\section{Controlling your Hardware} +Create a class in DAQ called \lstinline|YourHardwareController.cs|. Set this to be the start-up project. +\subsection{Creating and Modifying Tasks} +\begin{itemize} +\item Each channel must be defined as an object of the type \lstinline|Task|, which is located in \lstinline|NationalInstruments.DAQmx|. These tasks are created using methods of the following form +\begin{lstlisting} + private Task CreateAnalogInputTask(string channel) + { + Task task = new Task("NAVHCIn"+channel); + ((AnalogInputChannel)Environs.Hardware.AnalogInputChannels[channel]).AddToTask( + task, + 0, + 10 + ); + task.Control(TaskAction.Verify); + return task; + } + +\end{lstlisting} +With similar methods for digital and/or output tasks. It may also be useful to define methods which create analogue tasks with a specified range. In the above case, the low value is set to 0 and the high is set to 10. +\item Set methods are defined in a similar way +\begin{lstlisting} + private void SetAnalogOutput(Task task, double voltage) + { + AnalogSingleChannelWriter writer = new AnalogSingleChannelWriter(task.Stream); + writer.WriteSingleSample(true, voltage); + task.Control(TaskAction.Unreserve); + } +\end{lstlisting} +as are read methods +\begin{lstlisting} + private double ReadAnalogInput(Task task) + { + AnalogSingleChannelReader reader = new AnalogSingleChannelReader(task.Stream); + double val = reader.ReadSingleSample(); + task.Control(TaskAction.Unreserve); + return val; + } +\end{lstlisting} +For analogue channels, there is also a method which reads multiple samples at a user-defined sampling rate and returns their mean value. +\item When the digital tasks are created, they are added to Hash tables \lstinline|digitalTasks| or \lstinline|digitalInputTasks|, so these must also be defined +\end{itemize} +\subsection{Configuring the GUI} +In \lstinline|YourHardwareController|, create a method \lstinline|public void Start()|, which is the initialises the hardware controller. All the analogue and digital tasks are created here and the window is created using \lstinline|ControlWindow()|. After this, define methods \lstinline|internal void WindowLoaded()| and \lstinline|internal void WindowClosed()| which run after starting and closing the application respectively. In the controller window, a toolbox can be used to add components such as buttons, text fields and check boxes. As an example, I created a text box named \lstinline|bFieldTextBox| and defined a method in the controller class \lstinline|BFieldCurrent| which parses the value from this text box. A function \lstinline|UpdateBfield()| then outputs this as a voltage to the task \lstinline|bfieldCurrentOutputTask|. This is called in the method \lstinline|button1_Click| found in the \lstinline|ControlWindow| class. In the \lstinline|ControlWindow.Designer|, Visual Studio automatically generates definitions for the various controllable objects. By default these are private, but if they are required by other classes, then they must be redefined as public objects. Before the application can launch, a \lstinline|Runner| class must be written which contains the \lstinline|Main()| sequence that initialises and starts the hardware controller. In here, it is also possible to include remote access control so that the hardware controller can be controlled via other applications through TCP. +\subsection{Including Vision Acquistion} + \end{document} \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 88d7af18..a4786748 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,7 @@ -Copyright (C) 2005-2012, EDMSuite Team, Imperial College London - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (C) 2005-2012, EDMSuite Team, Imperial College London + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MOTMaster/ClassDiagram1.cd b/MOTMaster/ClassDiagram1.cd new file mode 100644 index 00000000..77a8b745 --- /dev/null +++ b/MOTMaster/ClassDiagram1.cd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/MOTMaster/Controller.cs b/MOTMaster/Controller.cs index c0f12fe6..3a8a7f3a 100644 --- a/MOTMaster/Controller.cs +++ b/MOTMaster/Controller.cs @@ -1,612 +1,708 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Remoting; -using System.Runtime.Remoting.Lifetime; -using System.Runtime.Serialization; -using System.Threading; -using System.Windows.Forms; -using System.Text; -using System.Diagnostics; -using System.Reflection; -using Microsoft.CSharp; - -using DAQ; -using DAQ.Environment; -using DAQ.HAL; -using DAQ.Analog; -using Data; -using Data.Scans; - - -//using IMAQ; - -using System.Runtime.InteropServices; -using System.CodeDom; -using System.CodeDom.Compiler; - -using NationalInstruments; -using NationalInstruments.DAQmx; -using NationalInstruments.UI; -using NationalInstruments.UI.WindowsForms; -using System.Runtime.Serialization.Formatters.Binary; - -namespace MOTMaster -{ - /// - /// Here's MOTMaster's controller. - /// - /// Gets a MOTMasterScript (a script contaning a series of commands like "addEdge" for both digital and analog) - /// from user (either remotely or via UI), compiles it, builds a pattern and sends it - /// to hardware. - /// - public class Controller : MarshalByRefObject - { - - #region Class members - - private static string - motMasterPath = (string)Environs.FileSystem.Paths["MOTMasterEXEPath"] + "//MotMaster.exe"; - private static string - daqPath = (string)Environs.FileSystem.Paths["daqDLLPath"]; - private static string - scriptListPath = (string)Environs.FileSystem.Paths["scriptListPath"]; - private static string - motMasterDataPath = (string)Environs.FileSystem.Paths["MOTMasterDataPath"]; - private static string - cameraAttributesPath = (string)Environs.FileSystem.Paths["CameraAttributesPath"]; - private static string - hardwareClassPath = (string)Environs.FileSystem.Paths["HardwareClassPath"]; - private static string digitalPGBoard = (string)Environs.Hardware.Boards["multiDAQ"]; - - private MMConfig config = (MMConfig)Environs.Hardware.GetInfo("MotMasterConfiguration"); - - private Thread runThread; - - public enum RunningState { stopped, running}; - public RunningState status = RunningState.stopped; - - ControllerWindow controllerWindow; - - DAQMxPatternGenerator pg; - DAQMxAnalogPatternGenerator apg; - - CameraControllable camera = null; - TranslationStageControllable tstage = null; - ExperimentReportable experimentReporter = null; - - MMDataIOHelper ioHelper; - - #endregion - - #region Initialisation - - // without this method, any remote connections to this object will time out after - // five minutes of inactivity. - // It just overrides the lifetime lease system completely. - public override Object InitializeLifetimeService() - { - return null; - } - - public void StartApplication() - { - - controllerWindow = new ControllerWindow(); - controllerWindow.controller = this; - - pg = new DAQMxPatternGenerator((string)Environs.Hardware.Boards["multiDAQ"]); - apg = new DAQMxAnalogPatternGenerator(); - - if (config.CameraUsed) camera = (CameraControllable)Activator.GetObject(typeof(CameraControllable), - "tcp://localhost:1172/controller.rem"); - - if (config.TranslationStageUsed) tstage = (TranslationStageControllable)Activator.GetObject(typeof(CameraControllable), - "tcp://localhost:1172/controller.rem"); - - if (config.ReporterUsed) experimentReporter = (ExperimentReportable)Activator.GetObject(typeof(ExperimentReportable), - "tcp://localhost:1172/controller.rem"); - - - ioHelper = new MMDataIOHelper(motMasterDataPath, - (string)Environs.Hardware.GetInfo("Element")); - - ScriptLookupAndDisplay(); - - Application.Run(controllerWindow); - - } - - #endregion - - #region Hardware control methods - - - private void run(MOTMasterSequence sequence) - { - apg.OutputPatternAndWait(sequence.AnalogPattern.Pattern); - pg.OutputPattern(sequence.DigitalPattern.Pattern); - } - - private void initializeHardware(MOTMasterSequence sequence) - { - - pg.Configure(config.DigitalPatternClockFrequency, false, true, true, sequence.DigitalPattern.Pattern.Length, true, false); - apg.Configure(sequence.AnalogPattern, config.AnalogPatternClockFrequency, false); - } - - - private void releaseHardware() - { - pg.StopPattern(); - apg.StopPattern(); - } - private void clearDigitalPattern(MOTMasterSequence sequence) - { - sequence.DigitalPattern.Clear(); //No clearing required for analog (I think). - } - private void releaseHardwareAndClearDigitalPattern(MOTMasterSequence sequence) - { - clearDigitalPattern(sequence); - releaseHardware(); - } - - #endregion - - #region Housekeeping on UI - - /// - MOTMaster looks in a folder ("scriptListPath") for all classes. - /// Then displays the list in a combo box. - /// - /// - These classes contain an implementation of a "MOTMasterScript". This contains the information - /// about the patterns. - public void ScriptLookupAndDisplay() - { - string[] s = scriptLookup(); - displayScripts(s); - } - private string[] scriptLookup() - { - string[] scriptList = Directory.GetFiles(scriptListPath, "*.cs"); - return scriptList; - } - private void displayScripts(string[] s) - { - controllerWindow.FillScriptComboBox(s); - } - - #endregion - - #region RUN RUN RUN (public & remotable stuff) - - /// - /// This is the guts of MOTMaster. - /// - /// - MOTMaster initializes the hardware, faffs a little to prepare the patterns in the - /// builders (e.g. calls "BuildPattern"), and sends the pattern to Hardware. - /// - /// -Note that the analog stuff needs a trigger to start!!!! Make sure one of your digital lines is reserved - /// for triggering the analog pattern. - /// - /// - Once the experiment is finished, MM releases the hardware. - /// - /// - MOTMaster also saves the data to a .zip. This includes: the original MOTMasterScript (.cs), a text file - /// with the parameters in it (IF DIFFERENT FROM THE VALUES IN .cs, THE PARAMETERS IN THE TEXT FILE ARE THE - /// CORRECT VALUES!), another text file with the camera attributes, yet another file (entitled hardware report) - /// which contains the values set by the Hardware controller at the start of the run, and a .png file(s) containing the final image(s). - /// - /// -There are 2 ways of using "Run". Run(null) uses the parameters given in the script (.cs file). - /// Run(Dictionary<>) compiles the .cs file but then replaces values in the dictionary. This is to allow - /// the user to inject values after compilation but before sending to hardware. By doing this, - /// the user can scan parameters using a python script, for example. - /// If you call Run(), MOTMaster immediately checks to see if you're running a fresh script - /// or whether you're re-running an old one. In the former case Run(null) is called. In the latter, - /// MOTMaster will fetch the dictionary used in the old experiment and use it as the - /// argument for Run(Dictionary<>). /// - /// - /// - - private bool saveEnable = true; - - public void SaveToggle(System.Boolean value) - { - saveEnable = value; - controllerWindow.SetSaveCheckBox(value); - } - private int batchNumber = 0; - public void SetBatchNumber(Int32 number) - { - batchNumber = number; - controllerWindow.WriteToSaveBatchTextBox(number); - } - private string scriptPath = ""; - public void SetScriptPath(String path) - { - scriptPath = path; - controllerWindow.WriteToScriptPath(path); - } - private bool replicaRun = false; - public void SetReplicaRunBool(System.Boolean value) - { - replicaRun = value; - } - private string dictionaryPath = ""; - public void SetDictionaryPath(String path) - { - dictionaryPath = path; - } - - public void RunStart() - { - runThread = new Thread(new ThreadStart(this.Run)); - runThread.Name = "MOTMaster Controller"; - runThread.Priority = ThreadPriority.Normal; - status = RunningState.running; - runThread.Start(); - } - - public void Run() - { - if (replicaRun) - { - Run(ioHelper.LoadDictionary(dictionaryPath)); - } - else - { - Run(null); - } - } - public void Run(Dictionary dict) - { - Stopwatch watch = new Stopwatch(); - MOTMasterScript script = prepareScript(scriptPath, dict); - if (script != null) - { - MOTMasterSequence sequence = getSequenceFromScript(script); - - try - { - if (config.CameraUsed) prepareCameraControl(); - - if (config.TranslationStageUsed) armTranslationStageForTimedMotion(script); - - if (config.CameraUsed) GrabImage((int)script.Parameters["NumberOfFrames"]); - - buildPattern(sequence, (int)script.Parameters["PatternLength"]); - - if (config.CameraUsed) waitUntilCameraIsReadyForAcquisition(); - - watch.Start(); - - for (int i = 0; i < controllerWindow.GetIterations() && status == RunningState.running; i++) - { - if(!config.Debug) runPattern(sequence); - } - if (!config.Debug) clearDigitalPattern(sequence); - - - watch.Stop(); - //MessageBox.Show(watch.ElapsedMilliseconds.ToString()); - if (saveEnable) - { - if (config.CameraUsed) - { - waitUntilCameraAquisitionIsDone(); - try - { - checkDataArrived(); - } - catch (DataNotArrivedFromHardwareControllerException) - { - return; - } - Dictionary report = null; - if (config.ReporterUsed) - { - report = GetExperimentReport(); - } - - save(script, scriptPath, imageData, report); - } - else - { - Dictionary report = null; - if (config.ReporterUsed) - { - report = GetExperimentReport(); - } - - save(script, scriptPath, report); - - } - - - } - if (config.CameraUsed) finishCameraControl(); - if (config.TranslationStageUsed) disarmAndReturnTranslationStage(); - } - catch (System.Net.Sockets.SocketException e) - { - MessageBox.Show("CameraControllable not found. \n Is there a hardware controller running? \n \n" + e.Message, "Remoting Error"); - } - } - else - { - MessageBox.Show("Unable to load pattern. \n Check that the script file exists and that it compiled successfully"); - } - status = RunningState.stopped; - - } - - #endregion - - #region private stuff - - - private void save(MOTMasterScript script, string pathToPattern, byte[,] imageData, Dictionary report) - { - ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, - script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); - } - private void save(MOTMasterScript script, string pathToPattern, byte[][,] imageData, Dictionary report) - { - ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, - script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); - } - private void save(MOTMasterScript script, string pathToPattern, Dictionary report) - { - ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, - script.Parameters, report, config.ExternalFilePattern); - } - private void runPattern(MOTMasterSequence sequence) - { - - initializeHardware(sequence); - run(sequence); - releaseHardware(); - } - - private MOTMasterScript prepareScript(string pathToPattern, Dictionary dict) - { - MOTMasterScript script; - CompilerResults results = compileFromFile(pathToPattern); - if (results != null) - { - script = loadScriptFromDLL(results); - if (dict != null) - { - script.EditDictionary(dict); - - } - return script; - } - return null; - } - - private void buildPattern(MOTMasterSequence sequence, int patternLength) - { - sequence.DigitalPattern.BuildPattern(patternLength); - sequence.AnalogPattern.BuildPattern(); - } - - #endregion - - #region Compiler & Loading DLLs - - /// - /// /// - Once the user has selected a particular implementation of MOTMasterScript, - /// MOTMaster will compile it. Note: the dll is currently stored in a temp folder somewhere. - /// Its pathToPattern can be found in the CompilerResults.PathToAssembly). - /// This newly formed dll contain methods named GetDigitalPattern and GetAnalogPattern. - /// - /// - These are called by the script's "GetSequence". GetSequence always returns a - /// "MOTMasterSequence", which comprises a PatternBuilder32 and an AnalogPatternBuilder. - /// - - private CompilerResults compileFromFile(string scriptPath) - { - CompilerParameters options = new CompilerParameters(); - - options.ReferencedAssemblies.Add(motMasterPath); - options.ReferencedAssemblies.Add(daqPath); - - TempFileCollection tempFiles = new TempFileCollection(); - tempFiles.KeepFiles = true; - CompilerResults results = new CompilerResults(tempFiles); - options.GenerateExecutable = false; //Creates .dll instead of .exe. - CodeDomProvider codeProvider = new CSharpCodeProvider(); - options.TempFiles = tempFiles; - try - { - results = codeProvider.CompileAssemblyFromFile(options, scriptPath); - } - catch (Exception e) - { - MessageBox.Show(e.Message); - return null; - } - //controllerWindow.WriteToScriptPath(results.PathToAssembly); - return results; - } - - private MOTMasterScript loadScriptFromDLL(CompilerResults results) - { - object loadedInstance = new object(); - try - { - Assembly patternAssembly = Assembly.LoadFrom(results.PathToAssembly); - foreach (Type type in patternAssembly.GetTypes()) - { - if (type.IsClass == true) - { - loadedInstance = Activator.CreateInstance(type); - } - } - } - catch (Exception e) - { - MessageBox.Show(e.Message); - return null; - } - return (MOTMasterScript)loadedInstance; - } - - private MOTMasterSequence getSequenceFromScript(MOTMasterScript script) - { - MOTMasterSequence sequence = script.GetSequence(); - return sequence; - } - - #endregion - - #region CameraControl - - /// - /// - Camera control is run through the hardware controller. All MOTMaster knows - /// about it a function called "GrabImage(string cameraSettings)". If the camera attributes are - /// set so that it needs a trigger, MOTMaster will have to deliver that too. - /// It'll expect a byte[,] or byte[][,] (if there are several images) as a return value. - /// - /// -At the moment MOTMaster won't run without a camera nor with - /// more than one. In the long term, we might - /// want to fix this. - /// - /// - int nof; - public void GrabImage(int numberOfFrames) - { - nof = numberOfFrames; - Thread LLEThread = new Thread(new ThreadStart(grabImage)); - LLEThread.Start(); - - } - - bool imagesRecieved = false; - /*private byte[,] imageData; - private void grabImage() - { - imagesRecieved = false; - imageData = (byte[,])camera.GrabSingleImage(cameraAttributesPath); - imagesRecieved = true; - }*/ - private byte[][,] imageData; - private void grabImage() - { - imagesRecieved = false; - imageData = camera.GrabMultipleImages(cameraAttributesPath, nof); - imagesRecieved = true; - } - public class DataNotArrivedFromHardwareControllerException : Exception { }; - private bool waitUntilCameraAquisitionIsDone() - { - while (!imagesRecieved) - { Thread.Sleep(10); } - return true; - } - private bool waitUntilCameraIsReadyForAcquisition() - { - while (!camera.IsReadyForAcquisition()) - { Thread.Sleep(10); } - return true; - } - private void prepareCameraControl() - { - camera.PrepareRemoteCameraControl(); - } - private void finishCameraControl() - { - camera.FinishRemoteCameraControl(); - } - private void checkDataArrived() - { - if (imageData == null) - { - MessageBox.Show("No data. Something's Wrong."); - throw new DataNotArrivedFromHardwareControllerException(); - } - } - #endregion - - #region Getting an Experiment Report - /// - /// This is the mechanism for saving experimental parameters which MM doesn't control, but that the hardware controller can monitor - /// (e.g. oven temperature, vacuum chamber pressure etc). - /// - - public Dictionary GetExperimentReport() - { - return experimentReporter.GetExperimentReport(); - } - - - #endregion - - #region Translation stage - private void armTranslationStageForTimedMotion(MOTMasterScript script) - { - tstage.TSConnect(); - Thread.Sleep(50); - tstage.TSInitialize((double)script.Parameters["TSAcceleration"], (double)script.Parameters["TSDeceleration"], - (double)script.Parameters["TSDistance"], (double)script.Parameters["TSVelocity"]); - Thread.Sleep(50); - tstage.TSOn(); - Thread.Sleep(50); - tstage.TSAutoTriggerDisable(); - Thread.Sleep(50); - tstage.TSGo(); - } - private void disarmAndReturnTranslationStage() - { - tstage.TSAutoTriggerEnable(); - Thread.Sleep(50); - tstage.TSReturn(); // This is the hard coded return of the translation stage at the end of running a MM script - Thread.Sleep(50); - tstage.TSDisconnect(); - } - #endregion - - #region Re-Running a script (intended for reloading old scripts) - - /// - /// This section is meant to be for the situation when you want to re-run exactly the same pattern - /// you ran sometime in the past. - /// armReplicaRun prompts you for a zip file which contains the run you want to replicate. It unzipps the - /// file into a folder of the same name, picks out the dictionary and the script. - /// These then get loaded in the usual way through Run(). - /// disposeReplicaRun does some clean up after the experiment is finished. - /// - - public void RunReplica() - { - armReplicaRun(); - Run(); - disposeReplicaRun(); - } - - private void armReplicaRun() - { - string zipPath = ioHelper.SelectSavedScriptPathDialog(); - string outputFolderPath = Path.GetDirectoryName(zipPath) + "\\" + - Path.GetFileNameWithoutExtension(zipPath) + "\\"; - - ioHelper.UnzipFolder(zipPath); - SetScriptPath(outputFolderPath + - Path.GetFileNameWithoutExtension(zipPath) + ".cs"); - - SetDictionaryPath(outputFolderPath + - Path.GetFileNameWithoutExtension(zipPath) + "_parameters.txt"); - - SetReplicaRunBool(true); - - } - - private void disposeReplicaRun() - { - SetReplicaRunBool(false); - ioHelper.DisposeReplicaScript(Path.GetDirectoryName(scriptPath)); - } - #endregion - } -} - +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Lifetime; +using System.Runtime.Serialization; +using System.Threading; +using System.Windows.Forms; +using System.Text; +using System.Diagnostics; +using System.Reflection; +using Microsoft.CSharp; +using System.Linq; + +using DAQ; +using DAQ.Environment; +using DAQ.HAL; +using DAQ.Analog; +using Data; +using Data.Scans; + + +//using IMAQ; + +using System.Runtime.InteropServices; +using System.CodeDom; +using System.CodeDom.Compiler; + +using NationalInstruments; +using NationalInstruments.DAQmx; +using NationalInstruments.UI; +using NationalInstruments.UI.WindowsForms; +using System.Runtime.Serialization.Formatters.Binary; + +using MOTMaster.SnippetLibrary; + +namespace MOTMaster +{ + /// + /// Here's MOTMaster's controller. + /// + /// Gets a MOTMasterScript (a script contaning a series of commands like "addEdge" for both digital and analog) + /// from user (either remotely or via UI), compiles it, builds a pattern and sends it + /// to hardware. + /// + public class Controller : MarshalByRefObject + { + + #region Class members + + private static string + motMasterPath = (string)Environs.FileSystem.Paths["MOTMasterEXEPath"] + "\\MotMaster.exe"; + private static string + daqPath = (string)Environs.FileSystem.Paths["daqDLLPath"]; + private static string + scriptListPath = (string)Environs.FileSystem.Paths["scriptListPath"]; + private static string + motMasterDataPath = (string)Environs.FileSystem.Paths["MOTMasterDataPath"]; + private static string + saveToDirectory = (string)Environs.FileSystem.Paths["MOTMasterDataPath"]; + private static string + cameraAttributesPath = (string)Environs.FileSystem.Paths["CameraAttributesPath"]; + private static string + hardwareClassPath = (string)Environs.FileSystem.Paths["HardwareClassPath"]; + private static string + snippetPath = (string)Environs.FileSystem.Paths["scriptSnippetPath"]; + + private static string digitalPGBoard = (string)Environs.Hardware.Boards["multiDAQ"]; + + private MMConfig config = (MMConfig)Environs.Hardware.GetInfo("MotMasterConfiguration"); + + private Thread runThread; + + public enum RunningState { stopped, running}; + public RunningState status = RunningState.stopped; + + + ControllerWindow controllerWindow; + + DAQMxPatternGenerator pg; + HSDIOPatternGenerator hs; + DAQMxPatternGenerator PCIpg; + DAQMxAnalogPatternGenerator apg; + MMAIWrapper aip; + + + CameraControllable camera = null; + TranslationStageControllable tstage = null; + ExperimentReportable experimentReporter = null; + + MuquansController muquans = null; + + MMDataIOHelper ioHelper; + + //DaqSystem myDaqSystem; + + #endregion + + #region Initialisation + + // without this method, any remote connections to this object will time out after + // five minutes of inactivity. + // It just overrides the lifetime lease system completely. + public override Object InitializeLifetimeService() + { + return null; + } + + public void StartApplication() + { + + controllerWindow = new ControllerWindow(); + controllerWindow.controller = this; + + if (!config.HSDIOCard) pg = new DAQMxPatternGenerator((string)Environs.Hardware.Boards["analog"]); + else hs = new HSDIOPatternGenerator((string)Environs.Hardware.Boards["hsDigital"]); + apg = new DAQMxAnalogPatternGenerator(); + PCIpg = new DAQMxPatternGenerator((string)Environs.Hardware.Boards["multiDAQPCI"]); + aip = new MMAIWrapper((string)Environs.Hardware.Boards["multiDAQPCI"]); + + + if (config.CameraUsed) camera = (CameraControllable)Activator.GetObject(typeof(CameraControllable), + "tcp://localhost:1172/controller.rem"); + + if (config.TranslationStageUsed) tstage = (TranslationStageControllable)Activator.GetObject(typeof(CameraControllable), + "tcp://localhost:1172/controller.rem"); + + if (config.ReporterUsed) experimentReporter = (ExperimentReportable)Activator.GetObject(typeof(ExperimentReportable), + "tcp://localhost:1172/controller.rem"); + + if (config.UseMuquans) muquans = new MuquansController(); + + ioHelper = new MMDataIOHelper(motMasterDataPath, + (string)Environs.Hardware.GetInfo("Element")); + + ScriptLookupAndDisplay(); + + Application.Run(controllerWindow); + } + + #endregion + + #region Hardware control methods + + + private void run(MOTMasterSequence sequence) + { + if (config.UseMuquans) + muquans.StartOutput(); + apg.OutputPatternAndWait(sequence.AnalogPattern.Pattern); + if (config.UseAI) aip.StartTask(); + if (!config.HSDIOCard) pg.OutputPattern(sequence.DigitalPattern.Pattern, true); + else + { + int[] loopTimes = ((DAQ.Pattern.HSDIOPatternBuilder)sequence.DigitalPattern).LoopTimes; + hs.OutputPattern(sequence.DigitalPattern.Pattern, loopTimes); + } + + } + private void initializeHardware(MOTMasterSequence sequence) + { + if (!config.HSDIOCard) pg.Configure(config.DigitalPatternClockFrequency, false, true, true, sequence.DigitalPattern.Pattern.Length, true, false); + else hs.Configure(config.DigitalPatternClockFrequency, false, true, false); + if (config.UseMuquans) muquans.Configure(); + apg.Configure(sequence.AnalogPattern, config.AnalogPatternClockFrequency, false); + } + + + private void releaseHardware() + { + if (!config.HSDIOCard) pg.StopPattern(); + else hs.StopPattern(); + apg.StopPattern(); + if (config.UseAI) aip.StopPattern(); + if (config.UseMuquans) muquans.StopOutput(); + } + + private void clearDigitalPattern(MOTMasterSequence sequence) + { + sequence.DigitalPattern.Clear(); //No clearing required for analog (I think). + } + private void releaseHardwareAndClearDigitalPattern(MOTMasterSequence sequence) + { + clearDigitalPattern(sequence); + releaseHardware(); + } + + + #endregion + + #region Housekeeping on UI + + /// - MOTMaster looks in a folder ("scriptListPath") for all classes. + /// Then displays the list in a combo box. + /// + /// - These classes contain an implementation of a "MOTMasterScript". This contains the information + /// about the patterns. + public void ScriptLookupAndDisplay() + { + string[] s = scriptLookup(); + displayScripts(s); + } + private string[] scriptLookup() + { + string[] scriptList = Directory.GetFiles(scriptListPath, "*.cs"); + return scriptList; + } + private void displayScripts(string[] s) + { + controllerWindow.FillScriptComboBox(s); + } + + #endregion + + #region RUN RUN RUN (public & remotable stuff) + + /// + /// This is the guts of MOTMaster. + /// + /// - MOTMaster initializes the hardware, faffs a little to prepare the patterns in the + /// builders (e.g. calls "BuildPattern"), and sends the pattern to Hardware. + /// + /// -Note that the analog stuff needs a trigger to start!!!! Make sure one of your digital lines is reserved + /// for triggering the analog pattern. + /// + /// - Once the experiment is finished, MM releases the hardware. + /// + /// - MOTMaster also saves the data to a .zip. This includes: the original MOTMasterScript (.cs), a text file + /// with the parameters in it (IF DIFFERENT FROM THE VALUES IN .cs, THE PARAMETERS IN THE TEXT FILE ARE THE + /// CORRECT VALUES!), another text file with the camera attributes, yet another file (entitled hardware report) + /// which contains the values set by the Hardware controller at the start of the run, and a .png file(s) containing the final image(s). + /// + /// -There are 2 ways of using "Run". Run(null) uses the parameters given in the script (.cs file). + /// Run(Dictionary<>) compiles the .cs file but then replaces values in the dictionary. This is to allow + /// the user to inject values after compilation but before sending to hardware. By doing this, + /// the user can scan parameters using a python script, for example. + /// If you call Run(), MOTMaster immediately checks to see if you're running a fresh script + /// or whether you're re-running an old one. In the former case Run(null) is called. In the latter, + /// MOTMaster will fetch the dictionary used in the old experiment and use it as the + /// argument for Run(Dictionary<>). /// + /// + + /// + + private bool saveEnable = true; + + + public void SaveToggle(System.Boolean value) + { + saveEnable = value; + controllerWindow.SetSaveCheckBox(value); + } + private int batchNumber = 0; + public void SetBatchNumber(Int32 number) + { + batchNumber = number; + controllerWindow.WriteToSaveBatchTextBox(number); + } + private string scriptPath = ""; + public void SetScriptPath(String path) + { + scriptPath = path; + controllerWindow.WriteToScriptPath(path); + } + private bool replicaRun = false; + public void SetReplicaRunBool(System.Boolean value) + { + replicaRun = value; + } + private string dictionaryPath = ""; + public void SetDictionaryPath(String path) + { + dictionaryPath = path; + } + + + public void RunStart() + { + runThread = new Thread(new ThreadStart(this.Run)); + runThread.Name = "MOTMaster Controller"; + runThread.Priority = ThreadPriority.Normal; + status = RunningState.running; + runThread.Start(); + } + + + public void Run() + { + status = RunningState.running; + if (replicaRun) + { + Run(ioHelper.LoadDictionary(dictionaryPath)); + } + else + { + Run(null); + } + } + + + public void Run(Dictionary dict) + { + Stopwatch watch = new Stopwatch(); + MOTMasterScript script = prepareScript(scriptPath, dict); + if (script != null) + { + MOTMasterSequence sequence = getSequenceFromScript(script); + try + { + if (config.CameraUsed) prepareCameraControl(); + + if (config.TranslationStageUsed) armTranslationStageForTimedMotion(script); + + if (config.CameraUsed) GrabImage((int)script.Parameters["NumberOfFrames"]); + + + buildPattern(sequence, (int)script.Parameters["PatternLength"]); + + if (config.CameraUsed) waitUntilCameraIsReadyForAcquisition(); + + watch.Start(); + + for (int i = 0; i < controllerWindow.GetIterations() && status == RunningState.running; i++) + { + if(!config.Debug) runPattern(sequence); + } + if (!config.Debug) clearDigitalPattern(sequence); + + watch.Stop(); + // MessageBox.Show(watch.ElapsedMilliseconds.ToString()); + if (saveEnable) + { + + if (config.CameraUsed) + { + + waitUntilCameraAquisitionIsDone(); + + try + { + checkDataArrived(); + } + catch (DataNotArrivedFromHardwareControllerException) + { + return; + } + + Dictionary report = null; + if (config.ReporterUsed) + { + report = GetExperimentReport(); + } + + save(script, scriptPath, imageData, report); + } + else + { + Dictionary report = null; + if (config.ReporterUsed) + { + report = GetExperimentReport(); + } + + save(script, scriptPath, report); + + } + + + } + if (config.CameraUsed) finishCameraControl(); + if (config.TranslationStageUsed) disarmAndReturnTranslationStage(); + + + } + catch (System.Net.Sockets.SocketException e) + { + MessageBox.Show("CameraControllable not found. \n Is there a hardware controller running? \n \n" + e.Message, "Remoting Error"); + } + } + else + { + MessageBox.Show("Unable to load pattern. \n Check that the script file exists and that it compiled successfully"); + } + + status = RunningState.stopped; + + + } + + #endregion + + #region private stuff + + private void updateSaveDirectory(string newDirectory) + { + saveToDirectory = newDirectory; + if (!Directory.Exists(newDirectory)) + { + Directory.CreateDirectory(saveToDirectory); + } + + } + + + private void save(MOTMasterScript script, string pathToPattern, byte[,] imageData, Dictionary report, double[,] aiData) + { + ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, byte[][,] imageData, Dictionary report, double[,] aiData) + { + ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, Dictionary report) + { + ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, + script.Parameters, report, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, byte[][,] imageData, Dictionary report) + { + ioHelper.StoreRun(motMasterDataPath, controllerWindow.GetSaveBatchNumber(), pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData ,config.ExternalFilePattern); + } + private void runPattern(MOTMasterSequence sequence) + { + + initializeHardware(sequence); + run(sequence); + releaseHardware(); + } + + private MOTMasterScript prepareScript(string pathToPattern, Dictionary dict) + { + MOTMasterScript script; + CompilerResults results = compileFromFile(pathToPattern); + if (results != null) + { + + script = loadScriptFromDLL(results); + if (dict != null) + { + script.EditDictionary(dict); + + } + return script; + + } + return null; + } + + private void buildPattern(MOTMasterSequence sequence, int patternLength) + { + sequence.DigitalPattern.BuildPattern(patternLength); + sequence.AnalogPattern.BuildPattern(); + } + + #endregion + + #region Compiler & Loading DLLs + + /// + /// /// - Once the user has selected a particular implementation of MOTMasterScript, + /// MOTMaster will compile it. Note: the dll is currently stored in a temp folder somewhere. + /// Its pathToPattern can be found in the CompilerResults.PathToAssembly). + /// This newly formed dll contain methods named GetDigitalPattern and GetAnalogPattern. + /// + /// - These are called by the script's "GetSequence". GetSequence always returns a + /// "MOTMasterSequence", which comprises a PatternBuilder32 and an AnalogPatternBuilder. + /// + + private CompilerResults compileFromFile(string scriptPath) + { + CompilerParameters options = new CompilerParameters(); + + options.ReferencedAssemblies.Add(motMasterPath); + options.ReferencedAssemblies.Add(daqPath); + + + TempFileCollection tempFiles = new TempFileCollection(); + tempFiles.KeepFiles = true; + CompilerResults results = new CompilerResults(tempFiles); + options.GenerateExecutable = false; //Creates .dll instead of .exe. + CodeDomProvider codeProvider = new CSharpCodeProvider(); + options.TempFiles = tempFiles; + try + { + results = codeProvider.CompileAssemblyFromFile(options, scriptPath); + if (results.Errors.Count >0) + { + MessageBox.Show("Error in MOTMaster Script Compilation"); + } + } + catch (Exception e) + { + MessageBox.Show(e.Message); + return null; + } + //controllerWindow.WriteToScriptPath(results.PathToAssembly); + return results; + } + + private MOTMasterScript loadScriptFromDLL(CompilerResults results) + { + object loadedInstance = new object(); + try + { + Assembly patternAssembly = Assembly.LoadFrom(results.PathToAssembly); + foreach (Type type in patternAssembly.GetTypes()) + { + if (type.IsClass == true) + { + loadedInstance = Activator.CreateInstance(type); + } + } + } + catch (Exception e) + { + MessageBox.Show(e.Message); + return null; + } + return (MOTMasterScript)loadedInstance; + } + + private MOTMasterSequence getSequenceFromScript(MOTMasterScript script) + { + MOTMasterSequence sequence = script.GetSequence(config.HSDIOCard,config.UseMuquans); + return sequence; + } + + #endregion + + #region CameraControl + + /// + /// - Camera control is run through the hardware controller. All MOTMaster knows + /// about it a function called "GrabImage(string cameraSettings)". If the camera attributes are + /// set so that it needs a trigger, MOTMaster will have to deliver that too. + /// It'll expect a byte[,] or byte[][,] (if there are several images) as a return value. + /// + /// -At the moment MOTMaster won't run without a camera nor with + /// more than one. In the long term, we might + /// want to fix this. + /// + /// + int nof; + public void GrabImage(int numberOfFrames) + { + nof = numberOfFrames; + Thread LLEThread = new Thread(new ThreadStart(grabImage)); + LLEThread.Start(); + + } + + bool imagesRecieved = false; + /*private byte[,] imageData; + private void grabImage() + { + imagesRecieved = false; + imageData = (byte[,])camera.GrabSingleImage(cameraAttributesPath); + imagesRecieved = true; + }*/ + private byte[][,] imageData; + private void grabImage() + { + imagesRecieved = false; + imageData = camera.GrabMultipleImages(cameraAttributesPath, nof); + imagesRecieved = true; + } + public class DataNotArrivedFromHardwareControllerException : Exception { }; + private bool waitUntilCameraAquisitionIsDone() + { + while (!imagesRecieved) + { Thread.Sleep(10); } + return true; + } + private bool waitUntilCameraIsReadyForAcquisition() + { + while (!camera.IsReadyForAcquisition()) + { Thread.Sleep(10); } + return true; + } + private void prepareCameraControl() + { + camera.PrepareRemoteCameraControl(); + } + private void finishCameraControl() + { + camera.FinishRemoteCameraControl(); + } + private void checkDataArrived() + { + if (imageData == null) + { + MessageBox.Show("No data. Something's Wrong."); + throw new DataNotArrivedFromHardwareControllerException(); + } + } + #endregion + + #region Getting an Experiment Report + /// + /// This is the mechanism for saving experimental parameters which MM doesn't control, but that the hardware controller can monitor + /// (e.g. oven temperature, vacuum chamber pressure etc). + /// + + public Dictionary GetExperimentReport() + { + return experimentReporter.GetExperimentReport(); + } + + #endregion + + #region Translation stage + private void armTranslationStageForTimedMotion(MOTMasterScript script) + { + tstage.TSConnect(); + Thread.Sleep(50); + tstage.TSInitialize((double)script.Parameters["TSAcceleration"], (double)script.Parameters["TSDeceleration"], + (double)script.Parameters["TSDistance"], (double)script.Parameters["TSVelocity"]); + Thread.Sleep(50); + tstage.TSOn(); + Thread.Sleep(50); + tstage.TSAutoTriggerDisable(); + Thread.Sleep(50); + tstage.TSGo(); + } + private void disarmAndReturnTranslationStage() + { + tstage.TSAutoTriggerEnable(); + Thread.Sleep(50); + tstage.TSReturn(); // This is the hard coded return of the translation stage at the end of running a MM script + Thread.Sleep(50); + tstage.TSDisconnect(); + } + #endregion + + #region Re-Running a script (intended for reloading old scripts) + + /// + /// This section is meant to be for the situation when you want to re-run exactly the same pattern + /// you ran sometime in the past. + /// armReplicaRun prompts you for a zip file which contains the run you want to replicate. It unzipps the + /// file into a folder of the same name, picks out the dictionary and the script. + /// These then get loaded in the usual way through Run(). + /// disposeReplicaRun does some clean up after the experiment is finished. + /// + + public void RunReplica() + { + armReplicaRun(); + Run(); + disposeReplicaRun(); + } + + private void armReplicaRun() + { + string zipPath = ioHelper.SelectSavedScriptPathDialog(); + string outputFolderPath = Path.GetDirectoryName(zipPath) + "\\" + + Path.GetFileNameWithoutExtension(zipPath) + "\\"; + + ioHelper.UnzipFolder(zipPath); + SetScriptPath(outputFolderPath + + Path.GetFileNameWithoutExtension(zipPath) + ".cs"); + + SetDictionaryPath(outputFolderPath + + Path.GetFileNameWithoutExtension(zipPath) + "_parameters.txt"); + + SetReplicaRunBool(true); + + } + + private void disposeReplicaRun() + { + SetReplicaRunBool(false); + ioHelper.DisposeReplicaScript(Path.GetDirectoryName(scriptPath)); + } + #endregion + + #region Remotable Stuff from python + + public void RemoteRun(string scriptName, Dictionary parameters, bool save) + { + scriptPath = scriptName; + saveEnable = save; + status = RunningState.running; + Run(parameters); + } + + public void CloseIt() + { + controllerWindow.Close(); + } + + public void SetSaveDirectory(string saveDirectory) + { + updateSaveDirectory(saveDirectory); + } + + public string getSaveDirectory() + { + return saveToDirectory; + } + + #endregion + } +} diff --git a/MOTMaster/ControllerWindow.Designer.cs b/MOTMaster/ControllerWindow.Designer.cs index 5b8c039e..cd88fd4e 100644 --- a/MOTMaster/ControllerWindow.Designer.cs +++ b/MOTMaster/ControllerWindow.Designer.cs @@ -1,255 +1,254 @@ -namespace MOTMaster -{ - partial class ControllerWindow - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.PatternPathTextBox = new System.Windows.Forms.TextBox(); - this.scriptListComboBox = new System.Windows.Forms.ComboBox(); - this.lookupScriptsButton = new System.Windows.Forms.Button(); - this.runButton = new System.Windows.Forms.Button(); - this.saveExperimentCheckBox = new System.Windows.Forms.CheckBox(); - this.saveBatchTextBox = new System.Windows.Forms.TextBox(); - this.selectScriptButton = new System.Windows.Forms.Button(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.patternsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newPatternToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ReplicateScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.label1 = new System.Windows.Forms.Label(); - this.stopButton = new System.Windows.Forms.Button(); - this.iterationsBox = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.menuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // PatternPathTextBox - // - this.PatternPathTextBox.Location = new System.Drawing.Point(129, 58); - this.PatternPathTextBox.Name = "PatternPathTextBox"; - this.PatternPathTextBox.ReadOnly = true; - this.PatternPathTextBox.Size = new System.Drawing.Size(454, 20); - this.PatternPathTextBox.TabIndex = 4; - // - // scriptListComboBox - // - this.scriptListComboBox.FormattingEnabled = true; - this.scriptListComboBox.Location = new System.Drawing.Point(16, 24); - this.scriptListComboBox.MaxDropDownItems = 32; - this.scriptListComboBox.Name = "scriptListComboBox"; - this.scriptListComboBox.Size = new System.Drawing.Size(566, 21); - this.scriptListComboBox.Sorted = true; - this.scriptListComboBox.TabIndex = 6; - // - // lookupScriptsButton - // - this.lookupScriptsButton.Location = new System.Drawing.Point(589, 24); - this.lookupScriptsButton.Name = "lookupScriptsButton"; - this.lookupScriptsButton.Size = new System.Drawing.Size(137, 23); - this.lookupScriptsButton.TabIndex = 7; - this.lookupScriptsButton.Text = "Refresh Script List"; - this.lookupScriptsButton.UseVisualStyleBackColor = true; - this.lookupScriptsButton.Click += new System.EventHandler(this.lookupScriptsButton_Click); - // - // runButton - // - this.runButton.Location = new System.Drawing.Point(589, 83); - this.runButton.Name = "runButton"; - this.runButton.Size = new System.Drawing.Size(137, 23); - this.runButton.TabIndex = 8; - this.runButton.Text = "Run"; - this.runButton.UseVisualStyleBackColor = true; - this.runButton.Click += new System.EventHandler(this.runButton_Click); - // - // saveExperimentCheckBox - // - this.saveExperimentCheckBox.AutoSize = true; - this.saveExperimentCheckBox.Checked = true; - this.saveExperimentCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.saveExperimentCheckBox.Location = new System.Drawing.Point(12, 109); - this.saveExperimentCheckBox.Name = "saveExperimentCheckBox"; - this.saveExperimentCheckBox.Size = new System.Drawing.Size(148, 17); - this.saveExperimentCheckBox.TabIndex = 9; - this.saveExperimentCheckBox.Text = "Save Experiment to batch"; - this.saveExperimentCheckBox.UseVisualStyleBackColor = true; - this.saveExperimentCheckBox.CheckedChanged += new System.EventHandler(this.saveExperimentCheckBox_CheckedChanged); - // - // saveBatchTextBox - // - this.saveBatchTextBox.ForeColor = System.Drawing.SystemColors.WindowText; - this.saveBatchTextBox.Location = new System.Drawing.Point(166, 107); - this.saveBatchTextBox.Name = "saveBatchTextBox"; - this.saveBatchTextBox.Size = new System.Drawing.Size(49, 20); - this.saveBatchTextBox.TabIndex = 10; - this.saveBatchTextBox.Text = "0"; - // - // selectScriptButton - // - this.selectScriptButton.Location = new System.Drawing.Point(589, 55); - this.selectScriptButton.Name = "selectScriptButton"; - this.selectScriptButton.Size = new System.Drawing.Size(137, 23); - this.selectScriptButton.TabIndex = 12; - this.selectScriptButton.Text = "Select Script"; - this.selectScriptButton.UseVisualStyleBackColor = true; - this.selectScriptButton.Click += new System.EventHandler(this.selectScriptButton_Click); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.patternsToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(736, 24); - this.menuStrip1.TabIndex = 13; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.quitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "File"; - // - // quitToolStripMenuItem - // - this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; - this.quitToolStripMenuItem.Size = new System.Drawing.Size(97, 22); - this.quitToolStripMenuItem.Text = "Quit"; - this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); - // - // patternsToolStripMenuItem - // - this.patternsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newPatternToolStripMenuItem, - this.ReplicateScriptToolStripMenuItem}); - this.patternsToolStripMenuItem.Name = "patternsToolStripMenuItem"; - this.patternsToolStripMenuItem.Size = new System.Drawing.Size(62, 20); - this.patternsToolStripMenuItem.Text = "Patterns"; - // - // newPatternToolStripMenuItem - // - this.newPatternToolStripMenuItem.Name = "newPatternToolStripMenuItem"; - this.newPatternToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.newPatternToolStripMenuItem.Text = "Select script"; - this.newPatternToolStripMenuItem.Click += new System.EventHandler(this.newPatternToolStripMenuItem_Click); - // - // ReplicateScriptToolStripMenuItem - // - this.ReplicateScriptToolStripMenuItem.Name = "ReplicateScriptToolStripMenuItem"; - this.ReplicateScriptToolStripMenuItem.ShowShortcutKeys = false; - this.ReplicateScriptToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.ReplicateScriptToolStripMenuItem.Text = "Replicate saved run"; - this.ReplicateScriptToolStripMenuItem.Click += new System.EventHandler(this.ReplicateScriptToolStripMenuItem_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 61); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(82, 13); - this.label1.TabIndex = 14; - this.label1.Text = "Selected Script:"; - // - // stopButton - // - this.stopButton.Location = new System.Drawing.Point(588, 112); - this.stopButton.Name = "stopButton"; - this.stopButton.Size = new System.Drawing.Size(136, 25); - this.stopButton.TabIndex = 15; - this.stopButton.Text = "Stop"; - this.stopButton.UseVisualStyleBackColor = true; - this.stopButton.Click += new System.EventHandler(this.stopButton_Click); - // - // iterationsBox - // - this.iterationsBox.Location = new System.Drawing.Point(129, 84); - this.iterationsBox.Name = "iterationsBox"; - this.iterationsBox.Size = new System.Drawing.Size(46, 20); - this.iterationsBox.TabIndex = 16; - this.iterationsBox.Text = "1"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(45, 88); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(53, 13); - this.label2.TabIndex = 17; - this.label2.Text = "Iterations:"; - // - // ControllerWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(736, 149); - this.Controls.Add(this.label2); - this.Controls.Add(this.iterationsBox); - this.Controls.Add(this.stopButton); - this.Controls.Add(this.label1); - this.Controls.Add(this.selectScriptButton); - this.Controls.Add(this.saveBatchTextBox); - this.Controls.Add(this.saveExperimentCheckBox); - this.Controls.Add(this.runButton); - this.Controls.Add(this.lookupScriptsButton); - this.Controls.Add(this.scriptListComboBox); - this.Controls.Add(this.PatternPathTextBox); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "ControllerWindow"; - this.Text = "MOTMaster Main Window"; - this.Load += new System.EventHandler(this.ControllerWindow_Load); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - public System.Windows.Forms.TextBox PatternPathTextBox; - private System.Windows.Forms.ComboBox scriptListComboBox; - private System.Windows.Forms.Button lookupScriptsButton; - private System.Windows.Forms.Button runButton; - private System.Windows.Forms.CheckBox saveExperimentCheckBox; - private System.Windows.Forms.TextBox saveBatchTextBox; - private System.Windows.Forms.Button selectScriptButton; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem patternsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newPatternToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem ReplicateScriptToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button stopButton; - private System.Windows.Forms.TextBox iterationsBox; - private System.Windows.Forms.Label label2; - } -} - + +namespace MOTMaster +{ + partial class ControllerWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.PatternPathTextBox = new System.Windows.Forms.TextBox(); + this.scriptListComboBox = new System.Windows.Forms.ComboBox(); + this.lookupScriptsButton = new System.Windows.Forms.Button(); + this.runButton = new System.Windows.Forms.Button(); + this.saveExperimentCheckBox = new System.Windows.Forms.CheckBox(); + this.saveBatchTextBox = new System.Windows.Forms.TextBox(); + this.selectScriptButton = new System.Windows.Forms.Button(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.patternsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newPatternToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ReplicateScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.label1 = new System.Windows.Forms.Label(); + this.stopButton = new System.Windows.Forms.Button(); + this.iterationsBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // PatternPathTextBox + // + this.PatternPathTextBox.Location = new System.Drawing.Point(129, 58); + this.PatternPathTextBox.Name = "PatternPathTextBox"; + this.PatternPathTextBox.ReadOnly = true; + this.PatternPathTextBox.Size = new System.Drawing.Size(454, 20); + this.PatternPathTextBox.TabIndex = 4; + // + // scriptListComboBox + // + this.scriptListComboBox.FormattingEnabled = true; + this.scriptListComboBox.Location = new System.Drawing.Point(16, 24); + this.scriptListComboBox.MaxDropDownItems = 32; + this.scriptListComboBox.Name = "scriptListComboBox"; + this.scriptListComboBox.Size = new System.Drawing.Size(566, 21); + this.scriptListComboBox.Sorted = true; + this.scriptListComboBox.TabIndex = 6; + // + // lookupScriptsButton + // + this.lookupScriptsButton.Location = new System.Drawing.Point(589, 24); + this.lookupScriptsButton.Name = "lookupScriptsButton"; + this.lookupScriptsButton.Size = new System.Drawing.Size(137, 23); + this.lookupScriptsButton.TabIndex = 7; + this.lookupScriptsButton.Text = "Refresh Script List"; + this.lookupScriptsButton.UseVisualStyleBackColor = true; + this.lookupScriptsButton.Click += new System.EventHandler(this.lookupScriptsButton_Click); + // + // runButton + // + this.runButton.Location = new System.Drawing.Point(589, 83); + this.runButton.Name = "runButton"; + this.runButton.Size = new System.Drawing.Size(137, 23); + this.runButton.TabIndex = 8; + this.runButton.Text = "Run"; + this.runButton.UseVisualStyleBackColor = true; + this.runButton.Click += new System.EventHandler(this.runButton_Click); + // + // saveExperimentCheckBox + // + this.saveExperimentCheckBox.AutoSize = true; + this.saveExperimentCheckBox.Location = new System.Drawing.Point(12, 109); + this.saveExperimentCheckBox.Name = "saveExperimentCheckBox"; + this.saveExperimentCheckBox.Size = new System.Drawing.Size(148, 17); + this.saveExperimentCheckBox.TabIndex = 9; + this.saveExperimentCheckBox.Text = "Save Experiment to batch"; + this.saveExperimentCheckBox.UseVisualStyleBackColor = true; + this.saveExperimentCheckBox.CheckedChanged += new System.EventHandler(this.saveExperimentCheckBox_CheckedChanged); + // + // saveBatchTextBox + // + this.saveBatchTextBox.ForeColor = System.Drawing.SystemColors.WindowText; + this.saveBatchTextBox.Location = new System.Drawing.Point(166, 107); + this.saveBatchTextBox.Name = "saveBatchTextBox"; + this.saveBatchTextBox.Size = new System.Drawing.Size(49, 20); + this.saveBatchTextBox.TabIndex = 10; + this.saveBatchTextBox.Text = "0"; + // + // selectScriptButton + // + this.selectScriptButton.Location = new System.Drawing.Point(589, 55); + this.selectScriptButton.Name = "selectScriptButton"; + this.selectScriptButton.Size = new System.Drawing.Size(137, 23); + this.selectScriptButton.TabIndex = 12; + this.selectScriptButton.Text = "Select Script"; + this.selectScriptButton.UseVisualStyleBackColor = true; + this.selectScriptButton.Click += new System.EventHandler(this.selectScriptButton_Click); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.patternsToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(731, 24); + this.menuStrip1.TabIndex = 13; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.quitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // quitToolStripMenuItem + // + this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; + this.quitToolStripMenuItem.Size = new System.Drawing.Size(97, 22); + this.quitToolStripMenuItem.Text = "Quit"; + this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); + // + // patternsToolStripMenuItem + // + this.patternsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newPatternToolStripMenuItem, + this.ReplicateScriptToolStripMenuItem}); + this.patternsToolStripMenuItem.Name = "patternsToolStripMenuItem"; + this.patternsToolStripMenuItem.Size = new System.Drawing.Size(62, 20); + this.patternsToolStripMenuItem.Text = "Patterns"; + // + // newPatternToolStripMenuItem + // + this.newPatternToolStripMenuItem.Name = "newPatternToolStripMenuItem"; + this.newPatternToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.newPatternToolStripMenuItem.Text = "Select script"; + this.newPatternToolStripMenuItem.Click += new System.EventHandler(this.newPatternToolStripMenuItem_Click); + // + // ReplicateScriptToolStripMenuItem + // + this.ReplicateScriptToolStripMenuItem.Name = "ReplicateScriptToolStripMenuItem"; + this.ReplicateScriptToolStripMenuItem.ShowShortcutKeys = false; + this.ReplicateScriptToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.ReplicateScriptToolStripMenuItem.Text = "Replicate saved run"; + this.ReplicateScriptToolStripMenuItem.Click += new System.EventHandler(this.ReplicateScriptToolStripMenuItem_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 61); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(82, 13); + this.label1.TabIndex = 14; + this.label1.Text = "Selected Script:"; + // + // stopButton + // + this.stopButton.Location = new System.Drawing.Point(588, 112); + this.stopButton.Name = "stopButton"; + this.stopButton.Size = new System.Drawing.Size(136, 25); + this.stopButton.TabIndex = 15; + this.stopButton.Text = "Stop"; + this.stopButton.UseVisualStyleBackColor = true; + this.stopButton.Click += new System.EventHandler(this.stopButton_Click); + // + // iterationsBox + // + this.iterationsBox.Location = new System.Drawing.Point(129, 84); + this.iterationsBox.Name = "iterationsBox"; + this.iterationsBox.Size = new System.Drawing.Size(46, 20); + this.iterationsBox.TabIndex = 16; + this.iterationsBox.Text = "1"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(45, 88); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(53, 13); + this.label2.TabIndex = 17; + this.label2.Text = "Iterations:"; + // + // ControllerWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(731, 218); + this.Controls.Add(this.label2); + this.Controls.Add(this.iterationsBox); + this.Controls.Add(this.stopButton); + this.Controls.Add(this.label1); + this.Controls.Add(this.selectScriptButton); + this.Controls.Add(this.saveBatchTextBox); + this.Controls.Add(this.saveExperimentCheckBox); + this.Controls.Add(this.runButton); + this.Controls.Add(this.lookupScriptsButton); + this.Controls.Add(this.scriptListComboBox); + this.Controls.Add(this.PatternPathTextBox); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "ControllerWindow"; + this.Text = "MOTMaster Main Window"; + this.Load += new System.EventHandler(this.ControllerWindow_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + public System.Windows.Forms.TextBox PatternPathTextBox; + private System.Windows.Forms.ComboBox scriptListComboBox; + private System.Windows.Forms.Button lookupScriptsButton; + private System.Windows.Forms.Button runButton; + private System.Windows.Forms.CheckBox saveExperimentCheckBox; + private System.Windows.Forms.TextBox saveBatchTextBox; + private System.Windows.Forms.Button selectScriptButton; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem patternsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newPatternToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ReplicateScriptToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button stopButton; + private System.Windows.Forms.TextBox iterationsBox; + private System.Windows.Forms.Label label2; + } +} + diff --git a/MOTMaster/ControllerWindow.cs b/MOTMaster/ControllerWindow.cs index 493f0238..8aad93ca 100644 --- a/MOTMaster/ControllerWindow.cs +++ b/MOTMaster/ControllerWindow.cs @@ -1,149 +1,150 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace MOTMaster -{ - public partial class ControllerWindow : Form - { - public Controller controller = new Controller(); - - public ControllerWindow() - { - InitializeComponent(); - } - - public void WriteToScriptPath(string str) - { - setTextBox(PatternPathTextBox, str); - } - - public void WriteToSaveBatchTextBox(int number) - { - setTextBox(saveBatchTextBox, Convert.ToString(number)); - } - public void SetSaveCheckBox(bool value) - { - setCheckBox(saveExperimentCheckBox, value); - } - #region wrappers - - private void setTextBox(TextBox box, string text) - { - box.Invoke(new SetTextDelegate(setTextHelper), new object[] { box, text }); - } - private delegate void SetTextDelegate(TextBox box, string text); - private void setTextHelper(TextBox box, string text) - { - box.Text = text; - } - private string readComboBox(ComboBox box) - { - return (string)box.Invoke(new ReadComboDelegate(readComboHelper), new object[] { box }); - } - private delegate string ReadComboDelegate(ComboBox box); - private string readComboHelper(ComboBox box) - { - return box.Text; - } - private void setCheckBox(CheckBox box, bool value) - { - box.Invoke(new SetCheckDelegate(setCheckHelper), new object[] { box, value }); - } - private delegate void SetCheckDelegate(CheckBox box, bool value); - private void setCheckHelper(CheckBox box, bool value) - { - box.Checked = value; - } - - #endregion - - public void FillScriptComboBox(string[] s) - { - scriptListComboBox.Items.Clear(); - scriptListComboBox.Items.AddRange(s); - scriptListComboBox.Text = s[0]; - } - - private void lookupScriptsButton_Click(object sender, EventArgs e) - { - controller.ScriptLookupAndDisplay(); - } - - private void runButton_Click(object sender, EventArgs e) - { - controller.RunStart(); - } - - private string getScriptPath() - { - return readComboBox(scriptListComboBox); - } - - private void ControllerWindow_Load(object sender, EventArgs e) - { - controller.SetScriptPath(getScriptPath()); - } - - private void saveExperimentCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (saveExperimentCheckBox.Checked == true) - { - saveBatchTextBox.Enabled = true; - controller.SaveToggle(true); - } - if (saveExperimentCheckBox.Checked == false) - { - saveBatchTextBox.Enabled = false; - controller.SaveToggle(false); - } - } - - public int GetSaveBatchNumber() - { - return int.Parse(saveBatchTextBox.Text); - } - - public int GetIterations() - { - return int.Parse(iterationsBox.Text); - } - - - private void selectScriptButton_Click(object sender, EventArgs e) - { - controller.SetScriptPath(getScriptPath()); - } - - private void newPatternToolStripMenuItem_Click(object sender, EventArgs e) - { - controller.SetScriptPath(getScriptPath()); - } - - private void quitToolStripMenuItem_Click(object sender, EventArgs e) - { - Close(); - } - - private void ReplicateScriptToolStripMenuItem_Click(object sender, EventArgs e) - { - controller.RunReplica(); - } - - private void stopButton_Click(object sender, EventArgs e) - { - controller.status = Controller.RunningState.stopped; - } - - - - - - - - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace MOTMaster +{ + public partial class ControllerWindow : Form + { + public Controller controller = new Controller(); + + public ControllerWindow() + { + InitializeComponent(); + } + + public void WriteToScriptPath(string str) + { + setTextBox(PatternPathTextBox, str); + } + + public void WriteToSaveBatchTextBox(int number) + { + setTextBox(saveBatchTextBox, Convert.ToString(number)); + } + public void SetSaveCheckBox(bool value) + { + setCheckBox(saveExperimentCheckBox, value); + } + #region wrappers + + private void setTextBox(TextBox box, string text) + { + box.Invoke(new SetTextDelegate(setTextHelper), new object[] { box, text }); + } + private delegate void SetTextDelegate(TextBox box, string text); + private void setTextHelper(TextBox box, string text) + { + box.Text = text; + } + private string readComboBox(ComboBox box) + { + return (string)box.Invoke(new ReadComboDelegate(readComboHelper), new object[] { box }); + } + private delegate string ReadComboDelegate(ComboBox box); + private string readComboHelper(ComboBox box) + { + return box.Text; + } + private void setCheckBox(CheckBox box, bool value) + { + box.Invoke(new SetCheckDelegate(setCheckHelper), new object[] { box, value }); + } + private delegate void SetCheckDelegate(CheckBox box, bool value); + private void setCheckHelper(CheckBox box, bool value) + { + box.Checked = value; + } + + #endregion + + public void FillScriptComboBox(string[] s) + { + scriptListComboBox.Items.Clear(); + scriptListComboBox.Items.AddRange(s); + scriptListComboBox.Text = s[0]; + } + + private void lookupScriptsButton_Click(object sender, EventArgs e) + { + controller.ScriptLookupAndDisplay(); + } + + private void runButton_Click(object sender, EventArgs e) + { + controller.RunStart(); + } + + private string getScriptPath() + { + return readComboBox(scriptListComboBox); + } + + private void ControllerWindow_Load(object sender, EventArgs e) + { + controller.SetScriptPath(getScriptPath()); + } + + private void saveExperimentCheckBox_CheckedChanged(object sender, EventArgs e) + { + if (saveExperimentCheckBox.Checked == true) + { + saveBatchTextBox.Enabled = true; + controller.SaveToggle(true); + } + if (saveExperimentCheckBox.Checked == false) + { + saveBatchTextBox.Enabled = false; + controller.SaveToggle(false); + } + } + + public int GetSaveBatchNumber() + { + return int.Parse(saveBatchTextBox.Text); + } + + public int GetIterations() + { + return int.Parse(iterationsBox.Text); + } + + + private void selectScriptButton_Click(object sender, EventArgs e) + { + controller.SetScriptPath(getScriptPath()); + } + + private void newPatternToolStripMenuItem_Click(object sender, EventArgs e) + { + controller.SetScriptPath(getScriptPath()); + } + + private void quitToolStripMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + private void ReplicateScriptToolStripMenuItem_Click(object sender, EventArgs e) + { + controller.RunReplica(); + } + + private void stopButton_Click(object sender, EventArgs e) + { + controller.status = Controller.RunningState.stopped; + } + + + + + + + + } +} + diff --git a/MOTMaster/ControllerWindow.resx b/MOTMaster/ControllerWindow.resx index d93bff8d..25d918dd 100644 --- a/MOTMaster/ControllerWindow.resx +++ b/MOTMaster/ControllerWindow.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + \ No newline at end of file diff --git a/MOTMaster/Imaging.cs b/MOTMaster/Imaging.cs new file mode 100644 index 00000000..ec5b6373 --- /dev/null +++ b/MOTMaster/Imaging.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using DAQ.Pattern; +using DAQ.Analog; +using MOTMaster; +using MOTMaster.SnippetLibrary; + + +namespace MOTMaster.SnippetLibrary +{ + public class Imaging : MOTMasterScriptSnippet + { + + public Imaging(HSDIOPatternBuilder hs, Dictionary parameters) + { + AddDigitalSnippet(hs,parameters); + } + + public Imaging(AnalogPatternBuilder p, Dictionary parameters) + { + AddAnalogSnippet(p,parameters); + } + + public Imaging(MuquansBuilder mu, Dictionary parameters) + { + AddMuquansCommands(mu,parameters); + } + public void AddDigitalSnippet(PatternBuilder32 hs, Dictionary parameters) + { + //The Image time is defined as the length of time we wait after switching off the MOT B field + int switchOffTime = (int)parameters["BfieldSwitchOffTime"] * (int)parameters["ScaleFactor"]; + int imagetime = ((int)parameters["BfieldSwitchOffTime"] + (int)parameters["ImageTime"]) * (int)parameters["ScaleFactor"]; + int backgroundtime = (int)parameters["BackgroundDwellTime"] * (int)parameters["ScaleFactor"]; + int exposuretime = (int)parameters["ExposureTime"] * (int)parameters["ScaleFactor"]; + int delaytime = (int)parameters["BfieldDelayTime"] * (int)parameters["ScaleFactor"]; + + + //Switch off light during the expansiontime + if ((int)parameters["ImageTime"]!=0) + hs.DownPulse(switchOffTime, 0, (int)parameters["ImageTime"] * (int)parameters["ScaleFactor"]+delaytime, "motTTL"); + + //Trigger laser jump + hs.Pulse(imagetime - 200, delaytime, 200, "slaveDDSTrig"); + + //Image the atoms + hs.Pulse(imagetime, delaytime, exposuretime, "cameraTTL"); + + + //hs.AddEdge("mphiTTL", imagetime + exposuretime, false); + hs.Pulse(imagetime + exposuretime + backgroundtime, delaytime, exposuretime, "cameraTTL"); + } + + public void AddAnalogSnippet(AnalogPatternBuilder p, Dictionary parameters) + { + + p.AddAnalogValue("mot3DCoil", (int)parameters["BfieldSwitchOffTime"], 0.0); + } + + public void AddMuquansCommands(MuquansBuilder mu, Dictionary parameters) + { + //Shifts the light to resonance with the 2->3 transition - note the extra 1.5MHz comes from a frequency shift with the AOM + // mu.SetFrequency("slave0",1.5); + } + } +} diff --git a/MOTMaster/Initialize.cs b/MOTMaster/Initialize.cs new file mode 100644 index 00000000..746352d2 --- /dev/null +++ b/MOTMaster/Initialize.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using DAQ.Pattern; +using DAQ.Analog; +using MOTMaster; +using MOTMaster.SnippetLibrary; + + +namespace MOTMaster.SnippetLibrary +{ + public class Initialize : MOTMasterScriptSnippet + { + public Initialize(HSDIOPatternBuilder hs, Dictionary parameters) + { + AddDigitalSnippet(hs, parameters); + } + + public Initialize(AnalogPatternBuilder p, Dictionary parameters) + { + AddAnalogSnippet(p, parameters); + } + + public Initialize(MuquansBuilder mu, Dictionary parameters) + { + AddMuquansCommands(mu, parameters); + } + public void AddDigitalSnippet(PatternBuilder32 hs, Dictionary parameters) + { + hs.AddEdge("motTTL", 0, true); + hs.AddEdge("mphiTTL", 0, true); + //Note the aom TTLs have an opposite sense + hs.AddEdge("xaomTTL", 0, false); + hs.AddEdge("yaomTTL", 0, false); + hs.AddEdge("zpaomTTL", 0, false); + hs.AddEdge("zmaomTTL", 0, false); + hs.AddEdge("pushaomTTL", 0, true); + hs.AddEdge("2DaomTTL", 0, false); + + //These pulses trigger the start of the DDS + hs.Pulse(4, 0, 500, "serialPreTrigger"); + hs.Pulse(1000, 0, 500, "aomDDSTrig"); + hs.Pulse(1000, 0, 500, "slaveDDSTrig"); + + } + + public void AddAnalogSnippet(AnalogPatternBuilder p, Dictionary parameters) + { + p.AddChannel("motCTRL"); + p.AddChannel("ramanCTRL"); + p.AddChannel("mphiCTRL"); + p.AddChannel("mot3DCoil"); + p.AddChannel("mot2DCoil"); + p.AddChannel("xbiasCoil"); + p.AddChannel("ybiasCoil"); + p.AddChannel("zbiasCoil"); + p.AddChannel("xbiasCoil2D"); + p.AddChannel("ybiasCoil2D"); + p.AddChannel("xaomAtten"); + p.AddChannel("yaomAtten"); + p.AddChannel("zpaomAtten"); + p.AddChannel("zmaomAtten"); + p.AddChannel("2DaomAtten"); + p.AddChannel("pushaomAtten"); + p.AddChannel("xaomFreq"); + p.AddChannel("yaomFreq"); + p.AddChannel("zpaomFreq"); + p.AddChannel("zmaomFreq"); + p.AddChannel("2DaomFreq"); + p.AddChannel("pushaomFreq"); + + //Switch on the light and magnetic fields + p.AddAnalogValue("motCTRL", 0, (double)parameters["MotPower"]); + p.AddAnalogValue("mphiCTRL", 0, (double)parameters["RepumpPower"]); + p.AddAnalogValue("mot3DCoil", 0, (double)parameters["3DBfield"]); + p.AddAnalogValue("mot2DCoil", 0, (double)parameters["2DBfield"]); + + //Attenuate the MOT beams to balance the powers + p.AddAnalogValue("xaomAtten", 0, (double)parameters["XAtten"]); + p.AddAnalogValue("yaomAtten", 0, (double)parameters["YAtten"]); + p.AddAnalogValue("zpaomAtten", 0, (double)parameters["ZPAtten"]); + p.AddAnalogValue("zmaomAtten", 0, (double)parameters["ZMAtten"]); + p.AddAnalogValue("pushaomAtten", 0, (double)parameters["PushAtten"]); + p.AddAnalogValue("2DaomAtten", 0, (double)parameters["2DMotAtten"]); + + p.AddAnalogValue("xaomFreq", 0, (double)parameters["XFreq"]); + p.AddAnalogValue("yaomFreq", 0, (double)parameters["YFreq"]); + p.AddAnalogValue("zpaomFreq", 0, (double)parameters["ZPFreq"]); + p.AddAnalogValue("zmaomFreq", 0, (double)parameters["ZMFreq"]); + p.AddAnalogValue("pushaomFreq", 0, (double)parameters["PushFreq"]); + p.AddAnalogValue("2DaomFreq", 0, (double)parameters["2DMotFreq"]); + } + + public void AddMuquansCommands(MuquansBuilder mu, Dictionary parameters) + { + mu.SetFrequency("slave0", (double)parameters["MOTdetuning"]); + mu.SetFrequency("mphi", (double)parameters["MPhiDetuning"]); + } + } +} diff --git a/MOTMaster/Load2DMOT.cs b/MOTMaster/Load2DMOT.cs new file mode 100644 index 00000000..d1f5c7cc --- /dev/null +++ b/MOTMaster/Load2DMOT.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using DAQ.Pattern; +using DAQ.Analog; +using MOTMaster.SnippetLibrary; +using MOTMaster; + +namespace MOTMaster.SnippetLibrary +{ + public class Load2DMOT : MOTMasterScriptSnippet + { + public Load2DMOT(HSDIOPatternBuilder hs, Dictionary parameters) + { + AddDigitalSnippet(hs, parameters); + } + public Load2DMOT(AnalogPatternBuilder p, Dictionary parameters) + { + AddAnalogSnippet(p, parameters); + } + public Load2DMOT(MuquansBuilder mu, Dictionary parameters) + { + AddMuquansCommands(mu, parameters); + } + + public void AddDigitalSnippet(PatternBuilder32 hs, Dictionary parameters) + { + int loadtime2D = (int)parameters["2DLoadTime"] * (int)parameters["ScaleFactor"]; + + + //Pulse push beam for the duration of the 2D mot loading time + hs.DownPulse(4, 0, loadtime2D, "pushaomTTL"); + + } + public void AddAnalogSnippet(AnalogPatternBuilder p, Dictionary parameters) + { + + } + + public void AddMuquansCommands(MuquansBuilder mu, Dictionary parameters) + { + + } + } +} diff --git a/MOTMaster/MMDataIOHelper.cs b/MOTMaster/MMDataIOHelper.cs index e9b329d7..c9e77efd 100644 --- a/MOTMaster/MMDataIOHelper.cs +++ b/MOTMaster/MMDataIOHelper.cs @@ -1,258 +1,258 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.IO.Compression; - -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Forms; - -namespace MOTMaster -{ - public class MMDataIOHelper - { - MMDataZipper zipper = new MMDataZipper(); - private string motMasterDataPath; - private string element; - - public MMDataIOHelper(string motMasterDataPath, string element) - { - this.motMasterDataPath = motMasterDataPath; - this.element = element; - } - - - - public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report, - string cameraAttributesPath, byte[,] imageData, string externalFilePattern) - { - string fileTag = getDataID(element, batchNumber); - - saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report, cameraAttributesPath, imageData); - - string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); - - //deleteFiles(saveFolder, fileTag); - deleteFiles(files); - } - public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report, - string cameraAttributesPath, byte[][,] imageData, string externalFilePattern) - { - string fileTag = getDataID(element, batchNumber); - - saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report, cameraAttributesPath, imageData); - - string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); - - //deleteFiles(saveFolder, fileTag); - deleteFiles(files); - } - public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report, string externalFilePattern) - { - string fileTag = getDataID(element, batchNumber); - - saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report); - - string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); - - //deleteFiles(saveFolder, fileTag); - deleteFiles(files); - } - private void deleteFiles(string[] files) - { - foreach (string s in files) - { - File.Delete(s); - } - } - // fileTag is the name tag of the files generated by MOTMaster. - // externalFilePattern is a filename pattern for files generated by external programs to be zipped up with all the other files (e.g. "*.tif" for image files generated by an external camera control program) - private string[] putCopiesOfFilesToZip(string saveFolder, string fileTag, string externalFilePattern) - { - string[] files; - string[] datafiles = Directory.GetFiles(saveFolder, fileTag + "*"); - if(externalFilePattern != null) - { - string[] imagefiles = Directory.GetFiles(saveFolder, externalFilePattern); - files = datafiles.Concat(imagefiles).ToArray(); - } - else - { - files = datafiles; - } - - System.IO.FileStream fs = new FileStream(saveFolder + fileTag + ".zip", FileMode.Create); - zipper.PrepareZip(fs); - foreach (string s in files) - { - string[] bits = (s.Split('\\')); - string name = bits[bits.Length - 1]; - zipper.AppendToZip(saveFolder, name); - } - zipper.CloseZip(); - fs.Close(); - return files; - } - private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report, - string cameraAttributesPath, byte[,] imageData) - { - storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); - File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); - File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); - storeCameraAttributes(saveFolder + fileTag + "_cameraParameters.txt", cameraAttributesPath); - storeImage(saveFolder + fileTag, imageData); - storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); - } - private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report, - string cameraAttributesPath, byte[][,] imageData) - { - storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); - File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); - File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); - storeCameraAttributes(saveFolder + fileTag + "_cameraParameters.txt", cameraAttributesPath); - storeImage(saveFolder + fileTag, imageData); - storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); - } - - private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, - Dictionary dict, Dictionary report) - { - storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); - File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); - File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); - storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); - } - - public string SelectSavedScriptPathDialog() - { - OpenFileDialog dialog = new OpenFileDialog(); - dialog.Filter = "DataSets|*.zip"; - dialog.Title = "Load previously saved pattern"; - dialog.Multiselect = false; - dialog.InitialDirectory = motMasterDataPath; - dialog.ShowDialog(); - return dialog.FileName; - } - - public void UnzipFolder(string path) - { - zipper.Unzip(path); - } - - public Dictionary LoadDictionary(string dictionaryPath) - { - string[] parameterStrings = File.ReadAllLines(dictionaryPath); - Dictionary dict = new Dictionary(); - char separator = '\t'; - foreach (string str in parameterStrings) - { - string[] keyValuePairs = str.Split(separator); - Type t = System.Type.GetType(keyValuePairs[2]); - dict.Add(keyValuePairs[0], Convert.ChangeType(keyValuePairs[1], t)); - } - return dict; - } - - public void DisposeReplicaScript(string folderPath) - { - Directory.Delete(folderPath, true); - } - - - private void storeCameraAttributes(string savePath, string attributesPath) - { - File.Copy(attributesPath, savePath); - } - - private void storeImage(string savePath, byte[][,] imageData) - { - for (int i = 0; i < imageData.Length; i++) - { - storeImage(savePath + "_" + i.ToString(), imageData[i]); - } - } - - private void storeImage(string savePath, byte[,] imageData) - { - int width = imageData.GetLength(1); - int height = imageData.GetLength(0); - byte[] pixels = new byte[width * height]; - for (int j = 0; j < height; j++) - { - for (int i = 0; i < width; i++) - { - pixels[(width * j) + i] = imageData[j, i]; - } - } - // Define the image palette - BitmapPalette myPalette = BitmapPalettes.Gray256Transparent; - - // Creates a new empty image with the pre-defined palette - - BitmapSource image = BitmapSource.Create( - width, - height, - 96, - 96, - PixelFormats.Indexed8, - myPalette, - pixels, - width); - - FileStream stream = new FileStream(savePath + ".png", FileMode.Create); - PngBitmapEncoder encoder = new PngBitmapEncoder(); - encoder.Interlace = PngInterlaceOption.On; - encoder.Frames.Add(BitmapFrame.Create(image)); - encoder.Save(stream); - stream.Dispose(); - - } - - private void storeDictionary(String dataStoreFilePath, Dictionary dict) - { - if (dict != null) - { - TextWriter output = File.CreateText(dataStoreFilePath); - foreach (KeyValuePair pair in dict) - { - output.Write(pair.Key); - output.Write('\t'); - output.Write(pair.Value.ToString()); - output.Write('\t'); - output.WriteLine(pair.Value.GetType()); - } - output.Close(); - } - - - } - - - - private string getDataID(string element, int batchNumber) - { - DateTime dt = DateTime.Now; - string dateTag; - string batchTag; - int subTag = 0; - - dateTag = String.Format("{0:ddMMMyy}", dt); - batchTag = batchNumber.ToString().PadLeft(2, '0'); - subTag = (Directory.GetFiles(motMasterDataPath, element + - dateTag + batchTag + "*.zip")).Length; - string id = element + dateTag + batchTag - + "_" + subTag.ToString().PadLeft(3, '0'); - return id; - } - - - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.IO.Compression; + +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Forms; + +namespace MOTMaster +{ + public class MMDataIOHelper + { + MMDataZipper zipper = new MMDataZipper(); + private string motMasterDataPath; + private string element; + + public MMDataIOHelper(string motMasterDataPath, string element) + { + this.motMasterDataPath = motMasterDataPath; + this.element = element; + } + + + + public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report, + string cameraAttributesPath, byte[,] imageData, string externalFilePattern) + { + string fileTag = getDataID(element, batchNumber); + + saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report, cameraAttributesPath, imageData); + + string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); + + //deleteFiles(saveFolder, fileTag); + deleteFiles(files); + } + public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report, + string cameraAttributesPath, byte[][,] imageData, string externalFilePattern) + { + string fileTag = getDataID(element, batchNumber); + + saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report, cameraAttributesPath, imageData); + + string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); + + //deleteFiles(saveFolder, fileTag); + deleteFiles(files); + } + public void StoreRun(string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report, string externalFilePattern) + { + string fileTag = getDataID(element, batchNumber); + + saveToFiles(fileTag, saveFolder, batchNumber, pathToPattern, pathToHardwareClass, dict, report); + + string[] files = putCopiesOfFilesToZip(saveFolder, fileTag, externalFilePattern); + + //deleteFiles(saveFolder, fileTag); + deleteFiles(files); + } + private void deleteFiles(string[] files) + { + foreach (string s in files) + { + File.Delete(s); + } + } + // fileTag is the name tag of the files generated by MOTMaster. + // externalFilePattern is a filename pattern for files generated by external programs to be zipped up with all the other files (e.g. "*.tif" for image files generated by an external camera control program) + private string[] putCopiesOfFilesToZip(string saveFolder, string fileTag, string externalFilePattern) + { + string[] files; + string[] datafiles = Directory.GetFiles(saveFolder, fileTag + "*"); + if(externalFilePattern != null) + { + string[] imagefiles = Directory.GetFiles(saveFolder, externalFilePattern); + files = datafiles.Concat(imagefiles).ToArray(); + } + else + { + files = datafiles; + } + + System.IO.FileStream fs = new FileStream(saveFolder + fileTag + ".zip", FileMode.Create); + zipper.PrepareZip(fs); + foreach (string s in files) + { + string[] bits = (s.Split('\\')); + string name = bits[bits.Length - 1]; + zipper.AppendToZip(saveFolder, name); + } + zipper.CloseZip(); + fs.Close(); + return files; + } + private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report, + string cameraAttributesPath, byte[,] imageData) + { + storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); + File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); + File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); + storeCameraAttributes(saveFolder + fileTag + "_cameraParameters.txt", cameraAttributesPath); + storeImage(saveFolder + fileTag, imageData); + storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); + } + private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report, + string cameraAttributesPath, byte[][,] imageData) + { + storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); + File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); + File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); + storeCameraAttributes(saveFolder + fileTag + "_cameraParameters.txt", cameraAttributesPath); + storeImage(saveFolder + fileTag, imageData); + storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); + } + + private void saveToFiles(string fileTag, string saveFolder, int batchNumber, string pathToPattern, string pathToHardwareClass, + Dictionary dict, Dictionary report) + { + storeDictionary(saveFolder + fileTag + "_parameters.txt", dict); + File.Copy(pathToPattern, saveFolder + fileTag + "_script.cs"); + File.Copy(pathToHardwareClass, saveFolder + fileTag + "_hardwareClass.cs"); + storeDictionary(saveFolder + fileTag + "_hardwareReport.txt", report); + } + + public string SelectSavedScriptPathDialog() + { + OpenFileDialog dialog = new OpenFileDialog(); + dialog.Filter = "DataSets|*.zip"; + dialog.Title = "Load previously saved pattern"; + dialog.Multiselect = false; + dialog.InitialDirectory = motMasterDataPath; + dialog.ShowDialog(); + return dialog.FileName; + } + + public void UnzipFolder(string path) + { + zipper.Unzip(path); + } + + public Dictionary LoadDictionary(string dictionaryPath) + { + string[] parameterStrings = File.ReadAllLines(dictionaryPath); + Dictionary dict = new Dictionary(); + char separator = '\t'; + foreach (string str in parameterStrings) + { + string[] keyValuePairs = str.Split(separator); + Type t = System.Type.GetType(keyValuePairs[2]); + dict.Add(keyValuePairs[0], Convert.ChangeType(keyValuePairs[1], t)); + } + return dict; + } + + public void DisposeReplicaScript(string folderPath) + { + Directory.Delete(folderPath, true); + } + + + private void storeCameraAttributes(string savePath, string attributesPath) + { + File.Copy(attributesPath, savePath); + } + + private void storeImage(string savePath, byte[][,] imageData) + { + for (int i = 0; i < imageData.Length; i++) + { + storeImage(savePath + "_" + i.ToString(), imageData[i]); + } + } + + private void storeImage(string savePath, byte[,] imageData) + { + int width = imageData.GetLength(1); + int height = imageData.GetLength(0); + byte[] pixels = new byte[width * height]; + for (int j = 0; j < height; j++) + { + for (int i = 0; i < width; i++) + { + pixels[(width * j) + i] = imageData[j, i]; + } + } + // Define the image palette + BitmapPalette myPalette = BitmapPalettes.Gray256Transparent; + + // Creates a new empty image with the pre-defined palette + + BitmapSource image = BitmapSource.Create( + width, + height, + 96, + 96, + PixelFormats.Indexed8, + myPalette, + pixels, + width); + + FileStream stream = new FileStream(savePath + ".png", FileMode.Create); + PngBitmapEncoder encoder = new PngBitmapEncoder(); + encoder.Interlace = PngInterlaceOption.On; + encoder.Frames.Add(BitmapFrame.Create(image)); + encoder.Save(stream); + stream.Dispose(); + + } + + private void storeDictionary(String dataStoreFilePath, Dictionary dict) + { + if (dict != null) + { + TextWriter output = File.CreateText(dataStoreFilePath); + foreach (KeyValuePair pair in dict) + { + output.Write(pair.Key); + output.Write('\t'); + output.Write(pair.Value.ToString()); + output.Write('\t'); + output.WriteLine(pair.Value.GetType()); + } + output.Close(); + } + + + } + + + + private string getDataID(string element, int batchNumber) + { + DateTime dt = DateTime.Now; + string dateTag; + string batchTag; + int subTag = 0; + + dateTag = String.Format("{0:ddMMMyy}", dt); + batchTag = batchNumber.ToString().PadLeft(2, '0'); + subTag = (Directory.GetFiles(motMasterDataPath, element + + dateTag + batchTag + "*.zip")).Length; + string id = element + dateTag + batchTag + + "_" + subTag.ToString().PadLeft(3, '0'); + return id; + } + + + } +} diff --git a/MOTMaster/MOTMaster.csproj b/MOTMaster/MOTMaster.csproj index e7a4a057..af513550 100644 --- a/MOTMaster/MOTMaster.csproj +++ b/MOTMaster/MOTMaster.csproj @@ -1,226 +1,250 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D} - WinExe - Properties - MOTMaster - MOTMaster - v4.5 - 512 - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - bin\Decelerator\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\EDM\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\EDMAnalysis\ - false - - - true - bin\Buffer\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\Sympathetic\ - DEBUG;TRACE - full - x86 - prompt - false - - - true - bin\SrF\ - DEBUG;TRACE - full - x86 - prompt - false - - - MOTMaster.Runner - - - MM.ico - - - true - bin\BufferClassic\ - DEBUG;TRACE - full - x86 - prompt - false - - - bin\CaF\ - false - - - bin\Wavemeter\ - - - bin\EDMTestCrate\ - - - - - - - - - - 3.0 - - - - 3.5 - - - - - 3.5 - - - 3.5 - - - - - - - - 3.0 - - - - - - Form - - - ControllerWindow.cs - - - - - - - - - ControllerWindow.cs - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - Designer - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - {BB737B99-2E9F-40C9-9809-895A7C51AD40} - DAQ - - - {BA0A0540-3F1C-483B-A180-CB78DF424F15} - SharedCode - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D} + WinExe + Properties + MOTMaster + MOTMaster + v4.5 + 512 + + + + + 3.5 + false + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + DEBUG + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + MOTMaster.Runner + + + MM.ico + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + DEBUG + + + bin\Nav\ + 0 + TRACE;DEBUG + full + true + false + false + + + + + + + + + + False + ..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies (64-bit)\Current\NationalInstruments.DAQmx.dll + + + + + + + 3.0 + + + + 3.5 + + + + + 3.5 + + + 3.5 + + + + + + + + 3.0 + + + + + + Form + + + ControllerWindow.cs + + + + + + + + + + + + ControllerWindow.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + Designer + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + DAQ + + + {fce9fc5d-8bc1-4517-b4f6-aa446831a930} + IMAQ + + + {BA0A0540-3F1C-483B-A180-CB78DF424F15} + SharedCode + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + + + \ No newline at end of file diff --git a/MOTMaster/MOTMaster.csproj.user b/MOTMaster/MOTMaster.csproj.user index c3ec0bfd..cea4bdbf 100644 --- a/MOTMaster/MOTMaster.csproj.user +++ b/MOTMaster/MOTMaster.csproj.user @@ -15,4 +15,34 @@ en-US false + + true + false + Navigator-ANAL + Project + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + \ No newline at end of file diff --git a/MOTMaster/MOTMasterScript.cs b/MOTMaster/MOTMasterScript.cs index 624d5c10..408472e8 100644 --- a/MOTMaster/MOTMasterScript.cs +++ b/MOTMaster/MOTMasterScript.cs @@ -12,15 +12,26 @@ public abstract class MOTMasterScript public abstract PatternBuilder32 GetDigitalPattern(); public abstract AnalogPatternBuilder GetAnalogPattern(); public Dictionary Parameters; + public abstract MMAIConfiguration GetAIConfiguration(); + public abstract HSDIOPatternBuilder GetHSDIOPattern(); + public abstract MuquansBuilder GetMuquansCommands(); public MOTMasterSequence GetSequence() + { + return GetSequence(false,false); + } + + public MOTMasterSequence GetSequence(bool hsdio,bool muquans) { MOTMasterSequence s = new MOTMasterSequence(); - s.DigitalPattern = GetDigitalPattern(); + if (hsdio) s.DigitalPattern = GetHSDIOPattern(); + else s.DigitalPattern = GetDigitalPattern(); s.AnalogPattern = GetAnalogPattern(); + s.AIConfiguration = GetAIConfiguration(); + if (muquans) + s.MuquansPattern = GetMuquansCommands(); return s; } - public void EditDictionary(Dictionary dictionary) { foreach (KeyValuePair k in dictionary) diff --git a/MOTMaster/MOTMasterSequence.cs b/MOTMaster/MOTMasterSequence.cs index aca4472c..93164517 100644 --- a/MOTMaster/MOTMasterSequence.cs +++ b/MOTMaster/MOTMasterSequence.cs @@ -12,5 +12,8 @@ public class MOTMasterSequence { public PatternBuilder32 DigitalPattern; public AnalogPatternBuilder AnalogPattern; + public MMAIConfiguration AIConfiguration; + public HSDIOPatternBuilder HSDIOPattern; + public MuquansBuilder MuquansPattern; } } diff --git a/MOTMaster/PIDController.cs b/MOTMaster/PIDController.cs new file mode 100644 index 00000000..65d7658c --- /dev/null +++ b/MOTMaster/PIDController.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using DAQ.Pattern; +using DAQ.Analog; +using DAQ; + +namespace MOTMaster.SnippetLibrary +{ + class PIDController + { + + //The idea here is to make the MOTMaster script more readable by having the PIDController sequence built by a separate class. + //Then we can set the state of the controller object in the MOTMaster Script using the enumerable controllerState. + //There will be three digital lines controlling the PID controller. + + public enum controllerState {AWAIT_RECAPTURE,IDLE }; + + private PatternBuilder32 pattern; + + private Dictionary idleStateSettings; + + private Dictionary awaitRecaptureStateSettings; + + private Dictionary> stateSettings; + + private void addEdges(controllerState state, int time) + { + foreach (string channel in stateSettings[state].Keys) + { + pattern.AddEdge(channel, time, stateSettings[state][channel]); + } + } + + public void invertErrorSignal(int time) + { + pattern.AddEdge("", time,true); + } + + public PIDController(PatternBuilder32 p) + { + pattern = p; + initialiseDictionaries(); + } + + private void initialiseDictionaries() + { + stateSettings = new Dictionary>(); + + #region idle state + idleStateSettings = new Dictionary(); + idleStateSettings.Add("",true); + #endregion + + #region + awaitRecaptureStateSettings = new Dictionary(); + awaitRecaptureStateSettings.Add("",true); + #endregion + + stateSettings[controllerState.IDLE] = idleStateSettings; + stateSettings[controllerState.AWAIT_RECAPTURE] = awaitRecaptureStateSettings; + } + + } +} diff --git a/MOTMaster/Properties/Resources.Designer.cs b/MOTMaster/Properties/Resources.Designer.cs index 227c5a0d..07a6e370 100644 --- a/MOTMaster/Properties/Resources.Designer.cs +++ b/MOTMaster/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.36213 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/MOTMaster/Properties/Settings.Designer.cs b/MOTMaster/Properties/Settings.Designer.cs index 2f24928e..4c57606a 100644 --- a/MOTMaster/Properties/Settings.Designer.cs +++ b/MOTMaster/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.36213 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ namespace MOTMaster.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/MOTMaster/RFMOTMaster.csproj b/MOTMaster/RFMOTMaster.csproj new file mode 100644 index 00000000..7a80412f --- /dev/null +++ b/MOTMaster/RFMOTMaster.csproj @@ -0,0 +1,242 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {693FBF90-F77E-4AC3-B91B-C8A8034D0B4D} + WinExe + Properties + MOTMaster + MOTMaster + v4.5 + 512 + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + + true + bin\Decelerator\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\EDM\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\EDMAnalysis\ + false + + + true + bin\Buffer\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Sympathetic\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\SrF\ + DEBUG;TRACE + full + x86 + prompt + false + + + MOTMaster.Runner + + + MM.ico + + + true + bin\BufferClassic\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\CaF\ + false + + + bin\RFMO\ + false + + + true + bin\RFMOT\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + + + + + False + ..\..\..\..\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\13.0.45.242\NationalInstruments.Net.dll + + + + + 3.0 + + + + 3.5 + + + + + 3.5 + + + 3.5 + + + + + + + + 3.0 + + + + + + Form + + + ControllerWindow.cs + + + + + + + + + + ControllerWindow.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + Designer + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + {BB737B99-2E9F-40C9-9809-895A7C51AD40} + DAQ + + + {FCE9FC5D-8BC1-4517-B4F6-AA446831A930} + IMAQ + + + {BA0A0540-3F1C-483B-A180-CB78DF424F15} + SharedCode + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + \ No newline at end of file diff --git a/MOTMaster/app.config b/MOTMaster/app.config index 6b710ed9..303bb67d 100644 --- a/MOTMaster/app.config +++ b/MOTMaster/app.config @@ -1,18 +1,22 @@ - + - + - - + + - - + + - - + + + + + + diff --git a/MoleculeMOTMasterScripts/MOTBasic.cs b/MoleculeMOTMasterScripts/MOTBasic.cs index 6da1bb36..cec9a4a0 100644 --- a/MoleculeMOTMasterScripts/MOTBasic.cs +++ b/MoleculeMOTMasterScripts/MOTBasic.cs @@ -1,94 +1,94 @@ -using MOTMaster; -using MOTMaster.SnippetLibrary; - -using System; -using System.Collections.Generic; - -using DAQ.Pattern; -using DAQ.Analog; - -// This script is supposed to be the basic script for loading a molecule MOT. -// Note that times are all in units of the clock periods of the two pattern generator boards (at present, both are 10us). -// All times are relative to the Q switch, though note that this is not the first event in the pattern. -public class Patterns : MOTMasterScript -{ - public Patterns() - { - Parameters = new Dictionary(); - Parameters["PatternLength"] = 50000; - Parameters["TCLBlockStart"] = 2000; // This is a time before the Q switch - Parameters["TCLBlockDuration"] = 48000; - Parameters["FlashToQ"] = 16; // This is a time before the Q switch - Parameters["QSwitchPulseDuration"] = 10; - Parameters["FlashPulseDuration"] = 10; - Parameters["slowingAOMOnStart"] = 250; - Parameters["slowingAOMOnDuration"] = 45000; - Parameters["slowingAOMOffStart"] = 1500; - Parameters["slowingAOMOffDuration"] = 35000; - Parameters["slowingRepumpAOMOnStart"] = 250; - Parameters["slowingRepumpAOMOnDuration"] = 45000; - Parameters["slowingRepumpAOMOffStart"] = 1500; - Parameters["slowingRepumpAOMOffDuration"] = 35000; - Parameters["MOTAOMStartTime"] = 4000; - Parameters["MOTAOMDuration"] = 5000; - Parameters["BSwitchOn"] = 0; - Parameters["BSwitchDuration"] = 35000; - Parameters["MOTCoilsCurrent"] = 10.0; - Parameters["Frame0Trigger"] = 2000; - Parameters["Frame0TriggerDuration"] = 10; - - Parameters["SlowingChirpStartTime"] = 340; - Parameters["SlowingChirpDuration"] = 1160; - Parameters["SlowingChirpStartValue"] = 0.0; - Parameters["SlowingChirpEndValue"] = -1.3; - - Parameters["v0IntensityRampStartTime"] = 3000; - Parameters["v0IntensityRampDuration"] = 2000; - Parameters["v0IntensityRampStartValue"] = 0.7; - Parameters["v0IntensityRampEndValue"] = 0.4; - Parameters["motAOMReStart"] = 30000; - - - - } - - public override PatternBuilder32 GetDigitalPattern() - { - PatternBuilder32 p = new PatternBuilder32(); - int patternStartBeforeQ = (int)Parameters["TCLBlockStart"]; - - p.Pulse(0, 0, (int)Parameters["TCLBlockDuration"], "tclBlock"); - p.Pulse(patternStartBeforeQ, -(int)Parameters["FlashToQ"], (int)Parameters["QSwitchPulseDuration"], "flash"); //trigger the flashlamp - p.Pulse(patternStartBeforeQ, 0, 10, "AnalogPatternTrigger"); //THIS TRIGGERS THE ANALOG PATTERN. The analog pattern will start at the same time as the Q-switch is fired. - p.Pulse(patternStartBeforeQ, 0, (int)Parameters["QSwitchPulseDuration"], "q"); //trigger the Q switch - p.Pulse(patternStartBeforeQ, (int)Parameters["slowingAOMOnStart"], (int)Parameters["slowingAOMOffStart"] - (int)Parameters["slowingAOMOnStart"], "aom"); //first pulse to slowing AOM - p.Pulse(patternStartBeforeQ, (int)Parameters["slowingAOMOffStart"] + (int)Parameters["slowingAOMOffDuration"], (int)Parameters["slowingAOMOnDuration"] - ((int)Parameters["slowingAOMOffStart"] - (int)Parameters["slowingAOMOnStart"]) - (int)Parameters["slowingAOMOffDuration"], "aom"); //second pulse to slowing AOM - p.Pulse(patternStartBeforeQ, (int)Parameters["slowingRepumpAOMOnStart"], (int)Parameters["slowingRepumpAOMOffStart"] - (int)Parameters["slowingRepumpAOMOnStart"], "aom2"); //first pulse to slowing repump AOM - p.Pulse(patternStartBeforeQ, (int)Parameters["slowingRepumpAOMOffStart"] + (int)Parameters["slowingRepumpAOMOffDuration"], (int)Parameters["slowingRepumpAOMOnDuration"] - ((int)Parameters["slowingRepumpAOMOffStart"] - (int)Parameters["slowingRepumpAOMOnStart"]) - (int)Parameters["slowingRepumpAOMOffDuration"], "aom2"); //second pulse to slowing repump AOM - p.Pulse(patternStartBeforeQ, (int)Parameters["MOTAOMStartTime"], (int)Parameters["MOTAOMDuration"], "motAOM"); //pulse off the MOT light to release the cloud - p.Pulse(patternStartBeforeQ, (int)Parameters["BSwitchOn"], (int)Parameters["BSwitchDuration"], "bTrigger"); //B field pulse - p.Pulse(patternStartBeforeQ, (int)Parameters["Frame0Trigger"], (int)Parameters["Frame0TriggerDuration"], "cameraTrigger"); //camera trigger for first frame - - return p; - } - - public override AnalogPatternBuilder GetAnalogPattern() - { - AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]); - p.AddChannel("slowingChirp"); - p.AddChannel("v0IntensityRamp"); - - p.AddAnalogValue("slowingChirp", 0, (double)Parameters["SlowingChirpStartValue"]); - p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpEndValue"]); - p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"] + (int)Parameters["SlowingChirpDuration"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpStartValue"]); - - p.AddAnalogValue("v0IntensityRamp", 0, (double)Parameters["v0IntensityRampStartValue"]); - p.AddLinearRamp("v0IntensityRamp", (int)Parameters["v0IntensityRampStartTime"], (int)Parameters["v0IntensityRampDuration"], (double)Parameters["v0IntensityRampEndValue"]); - p.AddAnalogValue("v0IntensityRamp", (int)Parameters["motAOMReStart"], (double)Parameters["v0IntensityRampStartValue"]); - - - p.SwitchAllOffAtEndOfPattern(); - return p; - } - -} +using MOTMaster; +using MOTMaster.SnippetLibrary; + +using System; +using System.Collections.Generic; + +using DAQ.Pattern; +using DAQ.Analog; + +// This script is supposed to be the basic script for loading a molecule MOT. +// Note that times are all in units of the clock periods of the two pattern generator boards (at present, both are 10us). +// All times are relative to the Q switch, though note that this is not the first event in the pattern. +public class Patterns : MOTMasterScript +{ + public Patterns() + { + Parameters = new Dictionary(); + Parameters["PatternLength"] = 50000; + Parameters["TCLBlockStart"] = 2000; // This is a time before the Q switch + Parameters["TCLBlockDuration"] = 48000; + Parameters["FlashToQ"] = 16; // This is a time before the Q switch + Parameters["QSwitchPulseDuration"] = 10; + Parameters["FlashPulseDuration"] = 10; + Parameters["slowingAOMOnStart"] = 250; + Parameters["slowingAOMOnDuration"] = 45000; + Parameters["slowingAOMOffStart"] = 1500; + Parameters["slowingAOMOffDuration"] = 35000; + Parameters["slowingRepumpAOMOnStart"] = 250; + Parameters["slowingRepumpAOMOnDuration"] = 45000; + Parameters["slowingRepumpAOMOffStart"] = 1500; + Parameters["slowingRepumpAOMOffDuration"] = 35000; + Parameters["MOTAOMStartTime"] = 4000; + Parameters["MOTAOMDuration"] = 5000; + Parameters["BSwitchOn"] = 0; + Parameters["BSwitchDuration"] = 35000; + Parameters["MOTCoilsCurrent"] = 10.0; + Parameters["Frame0Trigger"] = 2000; + Parameters["Frame0TriggerDuration"] = 10; + + Parameters["SlowingChirpStartTime"] = 340; + Parameters["SlowingChirpDuration"] = 1160; + Parameters["SlowingChirpStartValue"] = 0.0; + Parameters["SlowingChirpEndValue"] = -1.3; + + Parameters["v0IntensityRampStartTime"] = 3000; + Parameters["v0IntensityRampDuration"] = 2000; + Parameters["v0IntensityRampStartValue"] = 0.7; + Parameters["v0IntensityRampEndValue"] = 0.4; + Parameters["motAOMReStart"] = 30000; + + + + } + + public override PatternBuilder32 GetDigitalPattern() + { + PatternBuilder32 p = new PatternBuilder32(); + int patternStartBeforeQ = (int)Parameters["TCLBlockStart"]; + + p.Pulse(0, 0, (int)Parameters["TCLBlockDuration"], "tclBlock"); + p.Pulse(patternStartBeforeQ, -(int)Parameters["FlashToQ"], (int)Parameters["QSwitchPulseDuration"], "flash"); //trigger the flashlamp + p.Pulse(patternStartBeforeQ, 0, 10, "AnalogPatternTrigger"); //THIS TRIGGERS THE ANALOG PATTERN. The analog pattern will start at the same time as the Q-switch is fired. + p.Pulse(patternStartBeforeQ, 0, (int)Parameters["QSwitchPulseDuration"], "q"); //trigger the Q switch + p.Pulse(patternStartBeforeQ, (int)Parameters["slowingAOMOnStart"], (int)Parameters["slowingAOMOffStart"] - (int)Parameters["slowingAOMOnStart"], "aom"); //first pulse to slowing AOM + p.Pulse(patternStartBeforeQ, (int)Parameters["slowingAOMOffStart"] + (int)Parameters["slowingAOMOffDuration"], (int)Parameters["slowingAOMOnDuration"] - ((int)Parameters["slowingAOMOffStart"] - (int)Parameters["slowingAOMOnStart"]) - (int)Parameters["slowingAOMOffDuration"], "aom"); //second pulse to slowing AOM + p.Pulse(patternStartBeforeQ, (int)Parameters["slowingRepumpAOMOnStart"], (int)Parameters["slowingRepumpAOMOffStart"] - (int)Parameters["slowingRepumpAOMOnStart"], "aom2"); //first pulse to slowing repump AOM + p.Pulse(patternStartBeforeQ, (int)Parameters["slowingRepumpAOMOffStart"] + (int)Parameters["slowingRepumpAOMOffDuration"], (int)Parameters["slowingRepumpAOMOnDuration"] - ((int)Parameters["slowingRepumpAOMOffStart"] - (int)Parameters["slowingRepumpAOMOnStart"]) - (int)Parameters["slowingRepumpAOMOffDuration"], "aom2"); //second pulse to slowing repump AOM + p.Pulse(patternStartBeforeQ, (int)Parameters["MOTAOMStartTime"], (int)Parameters["MOTAOMDuration"], "motAOM"); //pulse off the MOT light to release the cloud + p.Pulse(patternStartBeforeQ, (int)Parameters["BSwitchOn"], (int)Parameters["BSwitchDuration"], "bTrigger"); //B field pulse + p.Pulse(patternStartBeforeQ, (int)Parameters["Frame0Trigger"], (int)Parameters["Frame0TriggerDuration"], "cameraTrigger"); //camera trigger for first frame + + return p; + } + + public override AnalogPatternBuilder GetAnalogPattern() + { + AnalogPatternBuilder p = new AnalogPatternBuilder((int)Parameters["PatternLength"]); + p.AddChannel("slowingChirp"); + p.AddChannel("v0IntensityRamp"); + + p.AddAnalogValue("slowingChirp", 0, (double)Parameters["SlowingChirpStartValue"]); + p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpEndValue"]); + p.AddLinearRamp("slowingChirp", (int)Parameters["SlowingChirpStartTime"] + (int)Parameters["SlowingChirpDuration"], (int)Parameters["SlowingChirpDuration"], (double)Parameters["SlowingChirpStartValue"]); + + p.AddAnalogValue("v0IntensityRamp", 0, (double)Parameters["v0IntensityRampStartValue"]); + p.AddLinearRamp("v0IntensityRamp", (int)Parameters["v0IntensityRampStartTime"], (int)Parameters["v0IntensityRampDuration"], (double)Parameters["v0IntensityRampEndValue"]); + p.AddAnalogValue("v0IntensityRamp", (int)Parameters["motAOMReStart"], (double)Parameters["v0IntensityRampStartValue"]); + + + p.SwitchAllOffAtEndOfPattern(); + return p; + } + +} diff --git a/MoleculeMOTMasterScripts/MoleculeMOTMasterScripts.csproj b/MoleculeMOTMasterScripts/MoleculeMOTMasterScripts.csproj index c41868e5..277a5267 100644 --- a/MoleculeMOTMasterScripts/MoleculeMOTMasterScripts.csproj +++ b/MoleculeMOTMasterScripts/MoleculeMOTMasterScripts.csproj @@ -1,66 +1,66 @@ - - - - - Debug - AnyCPU - {F5547C23-4266-47BA-83C8-B3C96E5D6A07} - Library - Properties - MoleculeMOTMasterScripts - MoleculeMOTMasterScripts - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\EDMTestCrate\ - - - - - - - - - - - - - - - - - {bb737b99-2e9f-40c9-9809-895a7c51ad40} - DAQ - - - {693fbf90-f77e-4ac3-b91b-c8a8034d0b4d} - MOTMaster - - - - + + + + + Debug + AnyCPU + {F5547C23-4266-47BA-83C8-B3C96E5D6A07} + Library + Properties + MoleculeMOTMasterScripts + MoleculeMOTMasterScripts + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + bin\EDMTestCrate\ + + + + + + + + + + + + + + + + + {bb737b99-2e9f-40c9-9809-895a7c51ad40} + DAQ + + + {693fbf90-f77e-4ac3-b91b-c8a8034d0b4d} + MOTMaster + + + + \ No newline at end of file diff --git a/MoleculeMOTMasterScripts/Properties/AssemblyInfo.cs b/MoleculeMOTMasterScripts/Properties/AssemblyInfo.cs index 2f40b7d9..863f8012 100644 --- a/MoleculeMOTMasterScripts/Properties/AssemblyInfo.cs +++ b/MoleculeMOTMasterScripts/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MoleculeMOTMasterScripts")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MoleculeMOTMasterScripts")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b7cdc6f4-f0d6-4d40-b6ca-ce3d465221d8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MoleculeMOTMasterScripts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MoleculeMOTMasterScripts")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b7cdc6f4-f0d6-4d40-b6ca-ce3d465221d8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MotMaster2/3axis.ico b/MotMaster2/3axis.ico new file mode 100644 index 00000000..1d13c217 Binary files /dev/null and b/MotMaster2/3axis.ico differ diff --git a/MotMaster2/AnalogInputChart.xaml b/MotMaster2/AnalogInputChart.xaml new file mode 100644 index 00000000..8902fa46 --- /dev/null +++ b/MotMaster2/AnalogInputChart.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/MotMaster2/AnalogInputChart.xaml.cs b/MotMaster2/AnalogInputChart.xaml.cs new file mode 100644 index 00000000..450a7701 --- /dev/null +++ b/MotMaster2/AnalogInputChart.xaml.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace MOTMaster2 +{ + /// + /// Interaction logic for AnalogInputChart.xaml + /// + public partial class AnalogInputChart : UserControl + { + public static ExperimentData ExpData {get;set;} + public AnalogInputChart() + { + InitializeComponent(); + DataContext = this; + if (Controller.expData == null) Controller.expData = new ExperimentData(); + ExpData = Controller.expData; + //sampleRateTextBox.DataContext = ExpData.SampleRate; + //nsampleTextBox.DataContext = ExpData.NSamples; + + } + + } +} diff --git a/MotMaster2/App.config b/MotMaster2/App.config new file mode 100644 index 00000000..877624ed --- /dev/null +++ b/MotMaster2/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/MotMaster2/App.xaml b/MotMaster2/App.xaml new file mode 100644 index 00000000..df1d3412 --- /dev/null +++ b/MotMaster2/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/MotMaster2/App.xaml.cs b/MotMaster2/App.xaml.cs new file mode 100644 index 00000000..0e768560 --- /dev/null +++ b/MotMaster2/App.xaml.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +using System.Runtime.Remoting.Channels.Tcp; + +namespace MOTMaster2 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + //TODO add all of this later + + //void Startup(object sender,StartupEventArgs e) + //{ + // base.OnStartup(e); + // AppDomain currentDomain = AppDomain.CurrentDomain; + + + + // // publish the controller to the remoting system + // TcpChannel channel = new TcpChannel(1187); + // ChannelServices.RegisterChannel(channel, false); + // RemotingServices.Marshal(controller, "controller.rem"); + + + // var application = new App(); + + // //application.InitializeComponent(); + // controller.StartApplication(); + + // application.Run(new MainWindow(controller)); + + // //Application.run(new MOTMasterWindow()); + + + // // the application is finishing - close down the remoting channel + // RemotingServices.Disconnect(controller); + // ChannelServices.UnregisterChannel(channel); + //} + } +} diff --git a/MotMaster2/Config/error.log b/MotMaster2/Config/error.log new file mode 100644 index 00000000..638d64f3 --- /dev/null +++ b/MotMaster2/Config/error.log @@ -0,0 +1,12 @@ +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off +(err:10) PLL lock is not engaged - currently off diff --git a/MotMaster2/Config/ukus_dds_comm_gw/macros.cmd b/MotMaster2/Config/ukus_dds_comm_gw/macros.cmd new file mode 100644 index 00000000..fb6ca573 --- /dev/null +++ b/MotMaster2/Config/ukus_dds_comm_gw/macros.cmd @@ -0,0 +1,5 @@ +@echo off +Doskey aom_dds=serial_to_dds_gw.exe C:\Code\ukus_dds_comm_gw\ukus_dds_aom_conf.txt comm 21 +Doskey aom_dds_verbose=serial_to_dds_gw.exe C:\Code\ukus_dds_comm_gw\ukus_dds_aom_conf.txt comm 21 verbose +Doskey slaves_dds=serial_to_dds_gw.exe C:\Code\ukus_dds_comm_gw\ukus_dds_slaves_conf.txt comm 19 +Doskey slaves_dds_verbose=serial_to_dds_gw.exe C:\Code\ukus_dds_comm_gw\ukus_dds_slaves_conf.txt comm 19 verbose \ No newline at end of file diff --git a/MotMaster2/Config/ukus_dds_comm_gw/serial_to_dds_gw.exe b/MotMaster2/Config/ukus_dds_comm_gw/serial_to_dds_gw.exe new file mode 100644 index 00000000..abad9381 Binary files /dev/null and b/MotMaster2/Config/ukus_dds_comm_gw/serial_to_dds_gw.exe differ diff --git a/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_aom_conf.txt b/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_aom_conf.txt new file mode 100644 index 00000000..c0f1ed99 --- /dev/null +++ b/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_aom_conf.txt @@ -0,0 +1,19 @@ + + + server = 192.168.1.126:3000 + + dds[0].name = ddsq + dds[0].type = ad9959 + dds[0].spi_cs = 0 + dds[0].spi_fclk = 5000000 + dds[0].gpio_reset = 24 + dds[0].reset_duration_usec = 10 + dds[0].int_upd_gpio = 25 + dds[0].int_upd_duration_usec = 5 + dds[0].core_fclk = 400e6 + dds[0].ramp_stepduration = 1e-6 + dds[0].ch[0].name = mphi + dds[0].ch[1].name = antenna + dds[0].ch[2].name = aom_mot + dds[0].ch[3].name = aom_raman + diff --git a/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_slaves_conf.txt b/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_slaves_conf.txt new file mode 100644 index 00000000..fbb91f99 --- /dev/null +++ b/MotMaster2/Config/ukus_dds_comm_gw/ukus_dds_slaves_conf.txt @@ -0,0 +1,29 @@ + + server = 192.168.1.125:3000 + + dds[0].name = ddsq + dds[0].type = ad9959 + dds[0].spi_cs = 0 + dds[0].spi_fclk = 5000000 + dds[0].gpio_reset = 24 + dds[0].reset_duration_usec = 10 + dds[0].int_upd_gpio = 25 + dds[0].int_upd_duration_usec = 5 + dds[0].core_fclk = 400e6 + dds[0].ramp_stepduration = 1e-6 + dds[0].ch[0].name = slave0 + dds[0].ch[1].name = slave1 + dds[0].ch[2].name = slave2 + dds[0].ch[3].name = ch3 + + + dds[1].name = dds_raman + dds[1].type = ad9852 + dds[1].spi_cs = 1 + dds[1].spi_fclk = 5000000 + dds[1].gpio_reset = 2 + dds[1].reset_duration_usec = 10 + dds[1].int_upd_gpio = 3 + dds[1].int_upd_duration_usec = 5 + dds[1].core_fclk = 200e6 + diff --git a/MotMaster2/Controller.cs b/MotMaster2/Controller.cs new file mode 100644 index 00000000..10e1e6ec --- /dev/null +++ b/MotMaster2/Controller.cs @@ -0,0 +1,1204 @@ +using DAQ; +using DAQ.Analog; +using DAQ.Environment; +using DAQ.HAL; +using Microsoft.CSharp; +using MOTMaster2.SequenceData; +using Newtonsoft.Json; +using System; +//using IMAQ; + +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Windows; +//using DataStructures; +using System.Runtime.Serialization.Formatters.Binary; +using UtilsNS; +using ErrorManager; + +namespace MOTMaster2 +{ + /// + /// Here's MOTMaster's controller. + /// + /// Gets a MOTMasterScript (a script contaning a series of commands like "addEdge" for both digital and analog) + /// from user (either remotely or via UI), compiles it, builds a pattern and sends it + /// to hardware. + /// + public class Controller : MarshalByRefObject + { + + #region Class members + + private static string + motMasterPath = (string)Environs.FileSystem.Paths["MOTMasterEXEPath"] + "MOTMaster2.exe"; + private static string + daqPath = (string)Environs.FileSystem.Paths["daqDLLPath"]; + private static string + scriptListPath = (string)Environs.FileSystem.Paths["scriptListPath"]; + private static string + motMasterDataPath = (string)Environs.FileSystem.Paths["DataPath"]; + private static string + saveToDirectory = (string)Environs.FileSystem.Paths["MOTMasterDataPath"]; + private static string + cameraAttributesPath = (string)Environs.FileSystem.Paths["CameraAttributesPath"]; + private static string + hardwareClassPath = (string)Environs.FileSystem.Paths["HardwareClassPath"]; + + private static string defaultScriptPath = scriptListPath + "\\defaultScript.sm2"; + + private static string digitalPGBoard = (string)Environs.Hardware.Boards["multiDAQ"]; + + public static MMConfig config = (MMConfig)Environs.Hardware.GetInfo("MotMasterConfiguration"); + + private Thread runThread; + + public enum RunningState { stopped, running }; + public RunningState status = RunningState.stopped; + + public List analogChannels; + public List digitalChannels; + public MOTMasterScript script; + public static Sequence sequenceData; + public static MOTMasterSequence sequence; + public static ExperimentData ExpData { get; set; } + public static AutoFileLogger dataLogger; + public static AutoFileLogger paramLogger; + public bool SendDataRemotely { get; set; } + + public event DataEventHandler MotMasterDataEvent; + public delegate void DataEventHandler(object sender, DataEventArgs d); + + DAQMxPatternGenerator pg; + HSDIOPatternGenerator hs; + DAQMxPatternGenerator PCIpg; + DAQMxAnalogPatternGenerator apg; + MMAIWrapper aip; + + private static int aiSampleRate = 200000; + private static double riseTime = 0.0001; + public static bool StaticSequence { get; set; } + + + CameraControllable camera = null; + TranslationStageControllable tstage = null; + ExperimentReportable experimentReporter = null; + + private WindfreakSynth microSynth; + public string ExperimentRunTag { get; set; } + public MMscan? ScanParam { get; set; } + MuquansController muquans = null; + public static ICEBlocDCS M2DCS; + public static ICEBlocPLL M2PLL; + + MMDataIOHelper ioHelper; + + SequenceBuilder builder; + + DataStructures.SequenceData ciceroSequence; + DataStructures.SettingsData ciceroSettings; + #endregion + + #region Initialisation + + // without this method, any remote connections to this object will time out after + // five minutes of inactivity. + // It just overrides the lifetime lease system completely. + public override Object InitializeLifetimeService() + { + return null; + } + + public void StartApplication() + { + if (Environs.Debug && config == null) + { + LoadEnvironment(); + } + LoadDefaultSequence(); + if (!config.HSDIOCard) pg = new DAQMxPatternGenerator((string)Environs.Hardware.Boards["analog"]); + else hs = new HSDIOPatternGenerator((string)Environs.Hardware.Boards["hsDigital"]); + apg = new DAQMxAnalogPatternGenerator(); + PCIpg = new DAQMxPatternGenerator((string)Environs.Hardware.Boards["multiDAQPCI"]); + aip = new MMAIWrapper((string)Environs.Hardware.Boards["analogIn"]); + + if (ExpData == null) { ExpData = new ExperimentData(); ExpData.SampleRate = aiSampleRate; ExpData.RiseTime = riseTime; } + digitalChannels = Environs.Hardware.DigitalOutputChannels.Keys.Cast().ToList(); + + if (config.CameraUsed) camera = (CameraControllable)Activator.GetObject(typeof(CameraControllable), + "tcp://localhost:1172/controller.rem"); + + if (config.TranslationStageUsed) tstage = (TranslationStageControllable)Activator.GetObject(typeof(CameraControllable), + "tcp://localhost:1172/controller.rem"); + + if (config.ReporterUsed) experimentReporter = (ExperimentReportable)Activator.GetObject(typeof(ExperimentReportable), + "tcp://localhost:1172/controller.rem"); + + if (config.UseMuquans) { muquans = new MuquansController(); if (!config.Debug) { microSynth = (WindfreakSynth)Environs.Hardware.Instruments["microwaveSynth"]; microSynth.Connect(); /*microSynth.TriggerMode = WindfreakSynth.TriggerTypes.Pulse;*/ } } + if (config.UseMSquared) + { + if (Environs.Hardware.Instruments.ContainsKey("MSquaredDCS")) M2DCS = (ICEBlocDCS)Environs.Hardware.Instruments["MSquaredDCS"]; + else throw new Exception("Cannot find DCS ICE-BLOC"); + if (Environs.Hardware.Instruments.ContainsKey("MSquaredPLL")) M2PLL = (ICEBlocPLL)Environs.Hardware.Instruments["MSquaredPLL"]; + else throw new Exception("Cannot find PLL ICE-BLOC"); + + + //Adds MSquared parameters if not already found + if (!sequenceData.Parameters.ContainsKey("PLLFreq")) + { + sequenceData.Parameters["PLLFreq"] = new Parameter("PLLFreq","",6834.689,true,false); + sequenceData.Parameters["ChirpRate"] = new Parameter("ChirpRate","",0.5,true,false); + sequenceData.Parameters["ChirpDuration"] = new Parameter("ChirpDuration","",0.5,true,false); + + sequenceData.Parameters["Pulse1Power"] = new Parameter("Pulse1Power","",22.0,true,false); + sequenceData.Parameters["Pulse1Duration"] = new Parameter("Pulse1Duration","",10,true,false); + sequenceData.Parameters["Pulse1Phase"] = new Parameter("Pulse1Phase","",0.0,true,false); + + sequenceData.Parameters["Pulse2Power"] = new Parameter("Pulse2Power","",22,true,false); + sequenceData.Parameters["Pulse2Duration"] = new Parameter("Pulse2Duration","",10,true,false); + sequenceData.Parameters["Pulse2Phase"] = new Parameter("Pulse2Phase","",0.0,true,false); + + sequenceData.Parameters["Pulse3Power"] = new Parameter("Pulse3Power","",22.0,true,false); + sequenceData.Parameters["Pulse3Duration"] = new Parameter("Pulse3Duration","",10,true,false); + sequenceData.Parameters["Pulse3Phase"] = new Parameter("Pulse3Phase","",0.0,true,false); + + sequenceData.Parameters["VelPulsePower"] = new Parameter("VelPulsePower","",22.0,true,false); + sequenceData.Parameters["VelPulseDuration"] = new Parameter("VelPulseDuration","",10,true,false); + sequenceData.Parameters["VelPulsePhase"] = new Parameter("VelPulsePhase","",0.0,true,false); + + + } + try + { + M2DCS.Connect(); + M2PLL.Connect(); + + M2PLL.StartLink(); + M2DCS.StartLink(); + SetMSquaredParameters(); + } + catch + { + //Set to popup to avoid Exception called when it can't write to a Log + if(!config.Debug)ErrorMgr.warningMsg("Could not set MSquared Parameters",-1,true); + } + } + + ioHelper = new MMDataIOHelper(motMasterDataPath, + (string)Environs.Hardware.GetInfo("Element")); + + ScriptLookupAndDisplay(); + } + + #endregion + + #region Hardware control methods + + + private void run(MOTMasterSequence sequence) + { + Stopwatch watch = new Stopwatch(); + watch.Start(); + if (config.UseMuquans) + { + muquans.StartOutput(); + } + Console.WriteLine("Started muquans at {0}ms", watch.ElapsedMilliseconds); + apg.OutputPatternAndWait(sequence.AnalogPattern.Pattern); + Console.WriteLine("Started apg at {0}ms", watch.ElapsedMilliseconds); + if (config.UseAI) aip.StartTask(); + if (!config.HSDIOCard) pg.OutputPattern(sequence.DigitalPattern.Pattern, true); + else + { + int[] loopTimes = ((DAQ.Pattern.HSDIOPatternBuilder)sequence.DigitalPattern).LoopTimes; + hs.OutputPattern(sequence.DigitalPattern.Pattern, loopTimes); + Console.WriteLine("Started hs at {0}ms", watch.ElapsedMilliseconds); + } + + } + private void ContinueLoop() + { + + //Just need to restart the cards + apg.StartPattern(); + if (config.UseAI) aip.StartTask(); + if (config.HSDIOCard) + { + hs.StartPattern(); + } + else + { + throw new NotImplementedException("DAQmx digital cards not currently supported"); + } + } + + private void initializeHardware(MOTMasterSequence sequence) + { + if (!config.HSDIOCard) pg.Configure(config.DigitalPatternClockFrequency, StaticSequence, true, true, sequence.DigitalPattern.Pattern.Length, true, false); + else hs.Configure(config.DigitalPatternClockFrequency, StaticSequence, true, false); + if (config.UseMuquans) muquans.Configure(StaticSequence); + apg.Configure(sequence.AnalogPattern, config.AnalogPatternClockFrequency, StaticSequence); + if (config.UseAI) { + aip.Configure(sequence.AIConfiguration, StaticSequence); + aip.AnalogDataReceived += OnAnalogDataReceived; + } + } + + + private void releaseHardware() + { + if (!config.HSDIOCard) pg.StopPattern(); + else hs.StopPattern(); + apg.StopPattern(); + if (config.UseAI) { aip.StopPattern(); } + if (config.UseMuquans) muquans.StopOutput(); + } + + private void pauseHardware() + { + apg.PauseLoop(); + if (config.UseAI) aip.PauseLoop(); + if (config.HSDIOCard) hs.PauseLoop(); + else throw new NotImplementedException("DAQmx digital cards not currently supported"); + } + //private void releaseHardwareLoop() + //{ + // if (!config.HSDIOCard) pg.StopPattern(); + // else hs.AbortRunning(); + // apg.AbortRunning(); + // if (config.UseAI) aip.AbortRunning(); + // if (config.UseMuquans) muquans.StopOutput(); + //} + private void clearDigitalPattern(MOTMasterSequence sequence) + { + sequence.DigitalPattern.Clear(); //No clearing required for analog (I think). + } + private void releaseHardwareAndClearDigitalPattern(MOTMasterSequence sequence) + { + clearDigitalPattern(sequence); + releaseHardware(); + } + + //TODO Add this to the experiment-specific AccelSuite + private void WriteToMicrowaveSynth(double value) + { + if (config.UseMuquans && !config.Debug) microSynth.ChannelA.Frequency = value; + } + + + protected void OnAnalogDataReceived(object sender, EventArgs e) + { + var rawData = config.Debug ? ExpData.GenerateFakeData() : aip.GetAnalogData(); + MMexec finalData = ConvertDataToAxelHub(rawData); + string dataJson = JsonConvert.SerializeObject(finalData, Formatting.Indented); + dataLogger.log("{\"MMExec\":" + dataJson + "},"); + if (SendDataRemotely) + { + if (MotMasterDataEvent != null) MotMasterDataEvent(this, new DataEventArgs(dataJson)); + } + } + + + internal void StopRunning() + { + if (!config.Debug) + { + while (IsRunning() && !StaticSequence) + { + WaitForRunToFinish(); + } + releaseHardware(); + } + StaticSequence = false; //Set this here in case we want to scan after + status = RunningState.stopped; + } + + + #endregion + + #region Housekeeping on UI + + /// - MOTMaster looks in a folder ("scriptListPath") for all classes. + /// Then displays the list in a combo box. + /// + /// - These classes contain an implementation of a "MOTMasterScript". This contains the information + /// about the patterns. + public void ScriptLookupAndDisplay() + { + string[] s = scriptLookup(); + displayScripts(s); + } + private string[] scriptLookup() + { + string[] scriptList = Directory.GetFiles(scriptListPath, "*.cs"); + return scriptList; + } + private void displayScripts(string[] s) + { + //controllerWindow.FillScriptComboBox(s); + } + + #endregion + + #region RUN RUN RUN (public & remotable stuff) + + /// + /// This is the guts of MOTMaster. + /// + /// - MOTMaster initializes the hardware, faffs a little to prepare the patterns in the + /// builders (e.g. calls "BuildPattern"), and sends the pattern to Hardware. + /// + /// -Note that the analog stuff needs a trigger to start!!!! Make sure one of your digital lines is reserved + /// for triggering the analog pattern. + /// + /// - Once the experiment is finished, MM releases the hardware. + /// + /// - MOTMaster also saves the data to a .zip. This includes: the original MOTMasterScript (.cs), a text file + /// with the parameters in it (IF DIFFERENT FROM THE VALUES IN .cs, THE PARAMETERS IN THE TEXT FILE ARE THE + /// CORRECT VALUES!), another text file with the camera attributes, yet another file (entitled hardware report) + /// which contains the values set by the Hardware controller at the start of the run, and a .png file(s) containing the final image(s). + /// + /// -There are 2 ways of using "Run". Run(null) uses the parameters given in the script (.cs file). + /// Run(Dictionary<>) compiles the .cs file but then replaces values in the dictionary. This is to allow + /// the user to inject values after compilation but before sending to hardware. By doing this, + /// the user can scan parameters using a python script, for example. + /// If you call Run(), MOTMaster immediately checks to see if you're running a fresh script + /// or whether you're re-running an old one. In the former case Run(null) is called. In the latter, + /// MOTMaster will fetch the dictionary used in the old experiment and use it as the + /// argument for Run(Dictionary<>). /// + /// + + /// + + private bool saveEnable = true; + + + public void SaveToggle(System.Boolean value) + { + //saveEnable = value; + //controllerWindow.SetSaveCheckBox(value); + } + private int batchNumber = 0; + public void SetBatchNumber(Int32 number) + { + batchNumber = number; + //controllerWindow.WriteToSaveBatchTextBox(number); + } + private string scriptPath = ""; + public void SetScriptPath(String path) + { + scriptPath = path; + //controllerWindow.WriteToScriptPath(path); + } + private bool replicaRun = false; + public void SetReplicaRunBool(System.Boolean value) + { + replicaRun = value; + } + private string dictionaryPath = ""; + public void SetDictionaryPath(String path) + { + dictionaryPath = path; + } + + public bool IsRunning() + { + if (status == RunningState.running) + { + Console.WriteLine("Thread Running"); + return true; + } + else + return false; + } + public void RunStart(Dictionary paramDict, bool loop = false) + { + runThread = new Thread(new ParameterizedThreadStart(this.Run)); + // StaticSequence = loop; + runThread.Name = "MOTMaster Controller"; + runThread.Priority = ThreadPriority.Highest; + status = RunningState.running; + runThread.Start(paramDict); + Console.WriteLine("Thread Starting"); + + } + public void WaitForRunToFinish() + { + if (runThread != null) runThread.Join(); + Console.WriteLine("Thread Waiting"); + } + + public void Run() + { + status = RunningState.running; + Run(replicaRun ? ioHelper.LoadDictionary(dictionaryPath) : null); + } + + public void Run(Dictionary dict) + { + Run(dict, 1, batchNumber); + } + + public void Run(object dict) + { + Run((Dictionary) dict, 1, batchNumber); + } + + public void Run(Dictionary dict, int numInterations, int batchNumber) + { + Stopwatch watch = new Stopwatch(); + if (config.UseMMScripts || sequenceData == null) + { + script = prepareScript(scriptPath, dict); + sequence = getSequenceFromScript(script); + } + else + { + + if (config.UseAI) + { + CreateAcquisitionTimeSegments(); + + } + if(!StaticSequence)sequence = getSequenceFromSequenceData(dict); + //TODO Change where this is sent. Di we want to send this before each shot during a scan? + if (batchNumber == 0) + { + //Only intialise and build once + if (StaticSequence) + { + sequence = getSequenceFromSequenceData(dict); + if(!config.Debug) initializeHardware(sequence); + if (config.UseMMScripts) buildPattern(sequence, (int)script.Parameters["PatternLength"]); + else buildPattern(sequence, (int)builder.Parameters["PatternLength"]); + } + MMexec initComm = InitialCommand(ScanParam); + string initJson = JsonConvert.SerializeObject(initComm, Formatting.Indented); + paramLogger.log("{\"MMExec\":" + initJson + "},"); + if (SendDataRemotely) + { + MotMasterDataEvent(this, new DataEventArgs(initJson)); + } + } + } + + + if (sequence != null) + { + try + { + if (config.CameraUsed) prepareCameraControl(); + + if (config.TranslationStageUsed) armTranslationStageForTimedMotion(script); + + if (config.CameraUsed) GrabImage((int)script.Parameters["NumberOfFrames"]); + + if (config.UseMuquans && !config.Debug) + { + microSynth.ChannelA.RFOn = true; + //microSynth.ChannelA.Amplitude = 6.0; + WriteToMicrowaveSynth((double)builder.Parameters["MWFreq"]); + + //microSynth.ReadSettingsFromDevice(); + } + if (!StaticSequence) + { + if (config.UseMMScripts) buildPattern(sequence, (int)script.Parameters["PatternLength"]); + else buildPattern(sequence, (int)builder.Parameters["PatternLength"]); + } + if (config.CameraUsed) waitUntilCameraIsReadyForAcquisition(); + + watch.Start(); + if (!config.Debug) + { + if (batchNumber == 0 || !StaticSequence) runPattern(sequence); + else ContinueLoop(); + } + //if (!config.Debug || config.UseMMScripts)clearDigitalPattern(sequence); + + watch.Stop(); + if (saveEnable) + { + + if (config.CameraUsed) + { + + waitUntilCameraAquisitionIsDone(); + + try + { + checkDataArrived(); + } + catch (DataNotArrivedFromHardwareControllerException) + { + return; + } + + Dictionary report = new Dictionary(); + if (config.ReporterUsed) + { + report = GetExperimentReport(); + //TODO Change save method + + } + save(script, scriptPath, imageData, report, batchNumber); + } + else + { + Dictionary report = new Dictionary(); + if (config.ReporterUsed) + { + report = GetExperimentReport(); + //TODO Change save method + + } + if (config.UseMMScripts) + { + save(script, scriptPath, report, batchNumber); + } + else + { + save(builder, motMasterDataPath,report, ExperimentRunTag,batchNumber); + } + } + + + } + if (config.CameraUsed) finishCameraControl(); + if (config.TranslationStageUsed) disarmAndReturnTranslationStage(); + if (config.UseMuquans && !config.Debug) microSynth.ChannelA.RFOn = false; + if (config.UseAI) OnAnalogDataReceived(this, null); + if (StaticSequence && !config.Debug) pauseHardware(); + } + catch (System.Net.Sockets.SocketException e) + { + MessageBox.Show("CameraControllable not found. \n Is there a hardware controller running? \n \n" + e.Message, "Remoting Error"); + } + } + else + { + throw new ErrorException("Sequence not found. \n Check that it has been built using the datagrid or loaded from a script."); + + } + + status = RunningState.stopped; + //Dereferences the MMScan object + ScanParam = null; + + + } + + + #endregion + + #region private stuff + + private void updateSaveDirectory(string newDirectory) + { + saveToDirectory = newDirectory; + if (!Directory.Exists(newDirectory)) + { + Directory.CreateDirectory(saveToDirectory); + } + + } + + //TODO Change the way everything is saved + private void save(MOTMasterScript script, string pathToPattern, byte[,] imageData, Dictionary report, double[,] aiData, int batchNumber) + { + ioHelper.StoreRun(motMasterDataPath, batchNumber, pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, byte[][,] imageData, Dictionary report, double[,] aiData, int batchNumber) + { + ioHelper.StoreRun(motMasterDataPath, batchNumber, pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, Dictionary report, int batchNumber) + { + ioHelper.StoreRun(motMasterDataPath, batchNumber, pathToPattern, hardwareClassPath, + script.Parameters, report, config.ExternalFilePattern); + } + private void save(MOTMasterScript script, string pathToPattern, byte[][,] imageData, Dictionary report, int batchNumber) + { + ioHelper.StoreRun(motMasterDataPath, batchNumber, pathToPattern, hardwareClassPath, + script.Parameters, report, cameraAttributesPath, imageData, config.ExternalFilePattern); + } + private void save(SequenceBuilder builder, string saveDirectory, Dictionary report,string element,int batchNumber) + { + ioHelper.StoreRun(builder, saveDirectory, report,element,batchNumber); + } + + + private void runPattern(MOTMasterSequence sequence) + { + if (!StaticSequence) + { + try + { + initializeHardware(sequence); + } + catch (Exception e) + { + throw new ErrorManager.ErrorException("Could not initialise hardware:" + e.Message); + } + } + run(sequence); + if (!StaticSequence) { aip.ReadAnalogDataFromBuffer(); releaseHardware(); } + //else pauseHardware(); + } + + private void debugRun(MOTMasterSequence sequence) + { + int[] loopTimes = ((DAQ.Pattern.HSDIOPatternBuilder)sequence.DigitalPattern).LoopTimes; + hs.BuildScriptForDebug(sequence.DigitalPattern.Pattern, loopTimes); + } + public MOTMasterScript prepareScript(string pathToPattern, Dictionary dict) + { + MOTMasterScript script; + CompilerResults results = compileFromFile(pathToPattern); + if (results != null) + { + + script = loadScriptFromDLL(results); + if (dict != null) + { + script.EditDictionary(dict); + + } + return script; + + } + return null; + } + + private void buildPattern(MOTMasterSequence sequence, int patternLength) + { + sequence.DigitalPattern.BuildPattern(patternLength); + sequence.AnalogPattern.BuildPattern(); + if (config.UseMuquans) muquans.BuildCommands(sequence.MuquansPattern.commands); + } + + #endregion + + #region Compiler & Loading DLLs + + /// + /// /// - Once the user has selected a particular implementation of MOTMasterScript, + /// MOTMaster will compile it. Note: the dll is currently stored in a temp folder somewhere. + /// Its pathToPattern can be found in the CompilerResults.PathToAssembly). + /// This newly formed dll contain methods named GetDigitalPattern and GetAnalogPattern. + /// + /// - These are called by the script's "GetSequence". GetSequence always returns a + /// "MOTMasterSequence", which comprises a PatternBuilder32 and an AnalogPatternBuilder. + /// + + private CompilerResults compileFromFile(string scriptPath) + { + CompilerParameters options = new CompilerParameters(); + + options.ReferencedAssemblies.Add(motMasterPath); + options.ReferencedAssemblies.Add(daqPath); + options.ReferencedAssemblies.Add("System.Core.dll"); + + + TempFileCollection tempFiles = new TempFileCollection(); + tempFiles.KeepFiles = true; + CompilerResults results = new CompilerResults(tempFiles); + options.GenerateExecutable = false; //Creates .dll instead of .exe. + CodeDomProvider codeProvider = new CSharpCodeProvider(); + options.TempFiles = tempFiles; + //options.GenerateInMemory = false; // may not be necessary...haven't tried this in a while + //options.OutputAssembly = string.Format(@"{0}\{1}", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "mydll.dll"); + try + { + results = codeProvider.CompileAssemblyFromFile(options, scriptPath); + if (results.Errors.Count > 0) + { + MessageBox.Show("Error in MOTMaster Script Compilation"); + } + } + catch (Exception e) + { + MessageBox.Show(e.Message); + return null; + } + //controllerWindow.WriteToScriptPath(results.PathToAssembly); + return results; + } + + private MOTMasterScript loadScriptFromDLL(CompilerResults results) + { + object loadedInstance = new object(); + try + { + Assembly patternAssembly = Assembly.LoadFrom(results.PathToAssembly); + foreach (Type type in patternAssembly.GetTypes()) + { + if (type.IsClass == true) + { + loadedInstance = Activator.CreateInstance(type); + } + } + } + catch (Exception e) + { + MessageBox.Show(e.Message + e.InnerException.Message, "Error in loading script DLL"); + return null; + } + + return (MOTMasterScript)loadedInstance; + } + + private MOTMasterSequence getSequenceFromScript(MOTMasterScript script) + { + MOTMasterSequence sequence = script.GetSequence(config.HSDIOCard, config.UseMuquans); + + return sequence; + } + + private MOTMasterSequence getSequenceFromSequenceData(Dictionary paramDict) + { + + builder = new SequenceBuilder(sequenceData); + builder.BuildSequence(); + if (paramDict != null) { builder.EditDictionary(paramDict); } + MOTMasterSequence sequence = builder.GetSequence(config.HSDIOCard,config.UseMuquans); + return sequence; + } + public void BuildMOTMasterSequence(List steps) + { + builder = new SequenceBuilder(sequenceData); + + builder.BuildSequence(); + + + sequence = builder.GetSequence(config.HSDIOCard, config.UseMuquans); + + if (sequenceData == null) + { + sequenceData = new Sequence(); + sequenceData.Steps = steps; + sequenceData.CreateParameterList(script.Parameters); + } + if (config.Debug) MessageBox.Show("Successfully Built Sequence."); + } + #endregion + + #region CameraControl + + /// + /// - Camera control is run through the hardware controller. All MOTMaster knows + /// about it a function called "GrabImage(string cameraSettings)". If the camera attributes are + /// set so that it needs a trigger, MOTMaster will have to deliver that too. + /// It'll expect a byte[,] or byte[][,] (if there are several images) as a return value. + /// + /// -At the moment MOTMaster won't run without a camera nor with + /// more than one. In the long term, we might + /// want to fix this. + /// + /// + int nof; + public void GrabImage(int numberOfFrames) + { + nof = numberOfFrames; + Thread LLEThread = new Thread(new ThreadStart(grabImage)); + LLEThread.Start(); + + } + + bool imagesRecieved = false; + /*private byte[,] imageData; + private void grabImage() + { + imagesRecieved = false; + imageData = (byte[,])camera.GrabSingleImage(cameraAttributesPath); + imagesRecieved = true; + }*/ + private byte[][,] imageData; + private void grabImage() + { + imagesRecieved = false; + imageData = camera.GrabMultipleImages(cameraAttributesPath, nof); + imagesRecieved = true; + } + public class DataNotArrivedFromHardwareControllerException : Exception { }; + private bool waitUntilCameraAquisitionIsDone() + { + while (!imagesRecieved) + { Thread.Sleep(10); } + return true; + } + private bool waitUntilCameraIsReadyForAcquisition() + { + while (!camera.IsReadyForAcquisition()) + { Thread.Sleep(10); } + return true; + } + private void prepareCameraControl() + { + camera.PrepareRemoteCameraControl(); + } + private void finishCameraControl() + { + camera.FinishRemoteCameraControl(); + } + private void checkDataArrived() + { + if (imageData == null) + { + MessageBox.Show("No data. Something's Wrong."); + throw new DataNotArrivedFromHardwareControllerException(); + } + } + #endregion + + #region Getting an Experiment Report + /// + /// This is the mechanism for saving experimental parameters which MM doesn't control, but that the hardware controller can monitor + /// (e.g. oven temperature, vacuum chamber pressure etc). + /// + + public Dictionary GetExperimentReport() + { + return experimentReporter.GetExperimentReport(); + } + + #endregion + + #region Translation stage + private void armTranslationStageForTimedMotion(MOTMasterScript script) + { + tstage.TSConnect(); + Thread.Sleep(50); + tstage.TSInitialize((double)script.Parameters["TSAcceleration"], (double)script.Parameters["TSDeceleration"], + (double)script.Parameters["TSDistance"], (double)script.Parameters["TSVelocity"]); + Thread.Sleep(50); + tstage.TSOn(); + Thread.Sleep(50); + tstage.TSAutoTriggerDisable(); + Thread.Sleep(50); + tstage.TSGo(); + } + private void disarmAndReturnTranslationStage() + { + tstage.TSAutoTriggerEnable(); + Thread.Sleep(50); + tstage.TSReturn(); // This is the hard coded return of the translation stage at the end of running a MM script + Thread.Sleep(50); + tstage.TSDisconnect(); + } + #endregion + + #region Re-Running a script (intended for reloading old scripts) + + /// + /// This section is meant to be for the situation when you want to re-run exactly the same pattern + /// you ran sometime in the past. + /// armReplicaRun prompts you for a zip file which contains the run you want to replicate. It unzipps the + /// file into a folder of the same name, picks out the dictionary and the script. + /// These then get loaded in the usual way through Run(). + /// disposeReplicaRun does some clean up after the experiment is finished. + /// + + public void RunReplica() + { + armReplicaRun(); + Run(); + disposeReplicaRun(); + } + + private void armReplicaRun() + { + string zipPath = ioHelper.SelectSavedScriptPathDialog(); + string outputFolderPath = Path.GetDirectoryName(zipPath) + "\\" + + Path.GetFileNameWithoutExtension(zipPath) + "\\"; + + ioHelper.UnzipFolder(zipPath); + SetScriptPath(outputFolderPath + + Path.GetFileNameWithoutExtension(zipPath) + ".cs"); + + SetDictionaryPath(outputFolderPath + + Path.GetFileNameWithoutExtension(zipPath) + "_parameters.txt"); + + SetReplicaRunBool(true); + + } + + private void disposeReplicaRun() + { + SetReplicaRunBool(false); + ioHelper.DisposeReplicaScript(Path.GetDirectoryName(scriptPath)); + } + #endregion + + #region Remotable Stuff from python + + public void RemoteRun(string scriptName, Dictionary parameters, bool save) + { + scriptPath = scriptName; + saveEnable = save; + status = RunningState.running; + Run(parameters); + } + + public void CloseIt() + { + //controllerWindow.Close(); + } + + public void SetSaveDirectory(string saveDirectory) + { + updateSaveDirectory(saveDirectory); + } + + public string getSaveDirectory() + { + return saveToDirectory; + } + + #endregion + + #region Environment Loading + public void LoadEnvironment() + { + + string fileJson = File.ReadAllText("filesystem.json"); + string hardwareJson = File.ReadAllText("hardware.json"); + string configJson = File.ReadAllText("config.json"); + + LoadEnvironment(fileJson, hardwareJson, configJson); + } + + public void LoadEnvironment(string fileJson, string hardwareJson, string configJson) + { + DAQ.Environment.Environs.FileSystem = JsonConvert.DeserializeObject(fileJson); + DAQ.Environment.Environs.Hardware = JsonConvert.DeserializeObject(hardwareJson); + config = JsonConvert.DeserializeObject(configJson); + } + public void SaveEnvironment() + { + string fileJson = JsonConvert.SerializeObject(DAQ.Environment.Environs.FileSystem, Formatting.Indented); + string hardwareJson = JsonConvert.SerializeObject(DAQ.Environment.Environs.Hardware, Formatting.Indented); + string configJson = JsonConvert.SerializeObject(config, Formatting.Indented); + File.WriteAllText("filesystem.json", fileJson); + File.WriteAllText("hardware.json", hardwareJson); + File.WriteAllText("config.json", configJson); + } + + public void LoadDefaultSequence() + { + if (File.Exists(defaultScriptPath)) LoadSequenceFromPath(defaultScriptPath); + } + + public void LoadSequenceFromPath(string path) + { + string sequenceJson = File.ReadAllText(path); + sequenceData = JsonConvert.DeserializeObject(sequenceJson); + //script.Parameters = sequenceData.CreateParameterDictionary(); + + } + public void SaveSequenceAsDefault(List steps) + { + SaveSequenceToPath(defaultScriptPath, steps); + } + + public void SaveSequenceToPath(string path, List steps) + { + + if (sequenceData == null) + { + sequenceData = new Sequence(); + sequenceData.CreateParameterList(script.Parameters); + sequenceData.Steps = steps; + } + string sequenceJson = JsonConvert.SerializeObject(sequenceData, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); + File.WriteAllText(path, sequenceJson); + } + + public void SaveSequenceToPath(string path) + { + string sequenceJson = JsonConvert.SerializeObject(sequenceData, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); + File.WriteAllText(path, sequenceJson); + } + #endregion + + #region Cicero Sequence Loading + + internal void LoadCiceroSequenceFromPath(string filename) + { + ciceroSequence = (DataStructures.SequenceData)DataStructures.Common.loadBinaryObjectFromFile(filename); + + } + + internal void LoadCiceroSettingsFromPath(string filename) + { + ciceroSettings = (DataStructures.SettingsData)DataStructures.Common.loadBinaryObjectFromFile(filename); + } + + internal void ConvertCiceroSequence() + { + + CiceroConverter ciceroConverter = new CiceroConverter(); + + ciceroConverter.SetSettingsData(ciceroSettings); + ciceroConverter.InitMMSequence(sequenceData); + + if (ciceroConverter.CheckValidHardwareChannels() && ciceroConverter.CanConvertFrom(ciceroSequence.GetType())) sequenceData = (Sequence)ciceroConverter.ConvertFrom(ciceroSequence); + } + + #endregion + + #region Saving and Processing Experiment Data + public void StartLogging() + { + string now = DateTime.Now.ToString("yyMMdd_hhmmss"); + string fileTag = motMasterDataPath + "/" + ExperimentRunTag + "_" + now; + dataLogger = new AutoFileLogger(fileTag + "_data.ahf"); + paramLogger = new AutoFileLogger(fileTag + "_parameters.ahf"); + dataLogger.Enabled = true; + paramLogger.Enabled = true; + dataLogger.log("{\"MMbatch\":["); + paramLogger.log("{\"MMbatch\":["); + } + public void StopLogging() + { + //Finishes writing the JSONs. Removes the last comma since Mathematica has issues with it + dataLogger.DropLastChar(); + paramLogger.DropLastChar(); + dataLogger.log("]\n}"); + paramLogger.log("]\n}"); + dataLogger.Enabled= false; + paramLogger.Enabled = false; + } + //This is very specific to the Navigator experiment. Assumes that the acqusition trigger channel is high during each segment that the data is recorded during + public void CreateAcquisitionTimeSegments() + { + if (!Environs.Hardware.DigitalOutputChannels.ContainsKey("acquisitionTrigger")) throw new WarningException("No channel named acquisitionTrigger found in Hardware"); + Dictionary> analogSegments = new Dictionary>(); + int sampleRate = ExpData.SampleRate; + int sampleStartTime = ExpData.PreTrigSamples; + List ignoredSegments = new List(); + ignoredSegments = sequenceData.Steps.Where(t => (t.Description.Contains("DNS") && t.GetDigitalData("acquisitionTrigger"))).Select(t => t.Name).ToList(); + ExpData.IgnoredSegments = ignoredSegments; + try + { + ExpData.InterferometerStepName = sequenceData.Steps.Where(t => (t.Description.Contains("Interferometer") && t.GetDigitalData("acquisitionTrigger"))).Select(t => t.Name).First(); + } + catch + { + ErrorMgr.errorMsg("No step named Interferometer.",-2); + } + foreach (SequenceStep step in sequenceData.Steps) + { + if (!step.GetDigitalData("acquisitionTrigger")) continue; + if (ignoredSegments.Count == 0) throw new WarningException("All acquired data will be saved."); + double timeMultiplier = 1.0; + if (step.Timebase == TimebaseUnits.ms) timeMultiplier = 1e-3; + else if (step.Timebase == TimebaseUnits.us) timeMultiplier = 1e-6; + else if (step.Timebase == TimebaseUnits.s) timeMultiplier = 1.0; + double duration = Convert.ToDouble(step.Duration); + int sampleDuration = Convert.ToInt32(duration*timeMultiplier*sampleRate); + string name = step.Name; + Tuple segmentTimes = Tuple.Create(sampleStartTime, sampleStartTime + sampleDuration ); + analogSegments[name] = segmentTimes; + sampleStartTime += sampleDuration; + } + ExpData.AnalogSegments = analogSegments; + ExpData.NSamples = sampleStartTime; + } + + public MMexec ConvertDataToAxelHub(double[,] aiData) + { + MMexec axelCommand = new MMexec(); + axelCommand.sender = "MOTMaster"; + axelCommand.cmd = "shotData"; + Dictionary segData = ExpData.SegmentShot(aiData); + foreach (KeyValuePair item in segData) axelCommand.prms[item.Key] = item.Value; + axelCommand.prms["runID"] = batchNumber; + axelCommand.prms["groupID"] = ExpData.ExperimentName; + return axelCommand; + } + + public MMexec InitialCommand(MMscan? scan) + { + MMexec axelCommand = new MMexec(); + axelCommand.sender = "MOTMaster"; + + axelCommand.mmexec = ExperimentRunTag; + axelCommand.prms["params"] = sequenceData.CreateParameterDictionary(); + axelCommand.prms["sampleRate"] = ExpData.SampleRate; + axelCommand.prms["runID"] = batchNumber; + axelCommand.prms["groupID"] = ExpData.ExperimentName; + if (scan != null) + { + MMscan s2 = (MMscan)scan; + s2.ToDictionary(ref axelCommand.prms); + // axelCommand.prms["scanParam"] = scanParam; + axelCommand.cmd = "scan"; + } + else + { + axelCommand.cmd = "repeat"; + } + return axelCommand; + } + + #endregion + + #region MSquared Control - Maybe move elswhere? + public void GetMSquaredParameters() + { + Dictionary pllDict = M2PLL.get_status(); + if ((string)pllDict["aux_lock_status"] != "on") throw new DAQ.HAL.PLLException("PLL lock is not engaged - currently set to " + (string)pllDict["aux_lock_status"]); + //The DCS ICEBloc does not implement a method to get the parameters of the current configuration + throw new NotImplementedException(); + } + + public static void SetMSquaredParameters() + { + if (!M2DCS.Connected || !M2PLL.Connected) + { + if(!config.Debug) ErrorMgr.warningMsg("Not connected to ICE-Blocs"); + return; + } + CheckPhaseLock(); + M2PLL.configure_lo_profile(true, false, "ecd", (double)sequenceData.Parameters["PLLFreq"].Value*1e6, 0.0, (double)sequenceData.Parameters["ChirpRate"].Value*1e6, (double)sequenceData.Parameters["ChirpDuration"].Value, true); + //Checks the phase lock has not come out-of-loop + CheckPhaseLock(); + + M2DCS.ConfigurePulse("X", 0, sequenceData.Parameters["VelPulseDuration"].Value, sequenceData.Parameters["VelPulsePower"].Value, 1e-6, sequenceData.Parameters["VelPulsePhase"].Value); + M2DCS.ConfigurePulse("X", 1, sequenceData.Parameters["Pulse1Duration"].Value, sequenceData.Parameters["Pulse1Power"].Value, 1e-6, sequenceData.Parameters["Pulse1Phase"].Value); + M2DCS.ConfigurePulse("X", 2, sequenceData.Parameters["Pulse2Duration"].Value, sequenceData.Parameters["Pulse2Power"].Value, 1e-6, sequenceData.Parameters["Pulse2Phase"].Value); + M2DCS.ConfigurePulse("X", 3, sequenceData.Parameters["Pulse3Duration"].Value, sequenceData.Parameters["Pulse3Power"].Value, 1e-6, sequenceData.Parameters["Pulse3Phase"].Value); + + M2DCS.UpdateSequenceParameters(); + } + + private static bool CheckPhaseLock() + { + DAQ.HAL.ICEBlocPLL.Lock_Status lockStatus = new DAQ.HAL.ICEBlocPLL.Lock_Status(); + bool locked = M2PLL.main_lock_status(out lockStatus); + if (!locked) ErrorMgr.errorMsg("PLL lock is not engaged - currently " + lockStatus.ToString(),10,false); + return locked; + } + #endregion + + + } + + public class DataEventArgs : EventArgs + { + public object Data { get; set; } + + public DataEventArgs(object data) : base() + { + Data = data; + } + } +} diff --git a/MotMaster2/ErrorManager.cs b/MotMaster2/ErrorManager.cs new file mode 100644 index 00000000..27a78b40 --- /dev/null +++ b/MotMaster2/ErrorManager.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Threading; +using System.Windows.Controls; +using System.IO; +using System.Windows; +using System.Windows.Media; +using System.Windows.Documents; +using UtilsNS; + +namespace ErrorManager +{ + public static class ErrorMgr + { + private static Label status; + private static Button btnReset, btnYes, btnNo; + private static Color dftForeground; + private static string prevText; + + private static RichTextBox log; + + private static string ErrorPath; + public static bool AutoSave = true; + public static bool Verbatim = false; + + private static System.IO.StreamWriter ErrorFile; + + public static void Initialize(ref Label _status, ref RichTextBox _log, string _ErrorPath) + { + status = _status; + if (status != null) + { + dftForeground = ((System.Windows.Media.SolidColorBrush)(status.Foreground)).Color; + + btnReset = new Button(); + btnReset.Content = "X"; + btnReset.Width = 25; + btnReset.Height = 25; + btnReset.Click += btnReset_Click; + (status.Parent as StackPanel).Children.Add(btnReset); + btnReset.Visibility = Visibility.Hidden; + + btnYes = new Button(); + btnYes.Content = "Yes"; + btnYes.Width = 25; + btnYes.Height = 25; + btnYes.Click += btnReset_Click; + (status.Parent as StackPanel).Children.Add(btnYes); + btnYes.Visibility = Visibility.Hidden; + + btnNo = new Button(); + btnNo.Content = "No"; + btnNo.Width = 25; + btnNo.Height = 25; + btnNo.Click += btnReset_Click; + (status.Parent as StackPanel).Children.Add(btnNo); + btnNo.Visibility = Visibility.Hidden; + } + log = _log; + ErrorPath = _ErrorPath; + if (!ErrorPath.EndsWith("\\")) ErrorPath += "\\"; + AutoSave = AutoSave && Directory.Exists(ErrorPath); + if (Directory.Exists(ErrorPath)) + { + ErrorFile = new System.IO.StreamWriter(ErrorPath + "error.log"); + ErrorFile.AutoFlush = true; + } + } + + private static void btnReset_Click(object sender, RoutedEventArgs e) + { + status.Content = prevText; + status.Foreground = new System.Windows.Media.SolidColorBrush(dftForeground); + btnReset.Visibility = Visibility.Hidden; + } + + public static void StatusLine(string text, Color Foreground) + { + if (status == null) return; + status.Foreground = new System.Windows.Media.SolidColorBrush(Foreground); + + btnReset.Visibility = Visibility.Visible; + prevText = status.Content.ToString(); + status.Content = text; + } + + public static void AppendLog(string text, Color? clr = null) + { + if (log == null) return; + string printOut = text; + if ((Verbatim) || (text.Length < 81)) printOut = text; + else printOut = text.Substring(0, 80) + "..."; + /* TextRange rangeOfText1 = new TextRange(log.Document.ContentEnd, log.Document.ContentEnd); + rangeOfText1.Text = printOut + "\r"; + rangeOfText1.ApplyPropertyValue(TextElement.ForegroundProperty, new System.Windows.Media.SolidColorBrush(Foreground)); + log.ScrollToEnd(); */ + Color ForeColor = clr.GetValueOrDefault(Brushes.Black.Color); + Application.Current.Dispatcher.BeginInvoke( + DispatcherPriority.Background, + new Action(() => + { + TextRange rangeOfText1 = new TextRange(log.Document.ContentStart, log.Document.ContentEnd); + string tx = rangeOfText1.Text; + int len = tx.Length; int maxLen = 10000; // the number of chars kept + if (len > (2 * maxLen)) // when it exceeds twice the maxLen + { + tx = tx.Substring(maxLen); + var paragraph = new Paragraph(); + paragraph.Inlines.Add(new Run(tx)); + log.Document.Blocks.Clear(); + log.Document.Blocks.Add(paragraph); + } + rangeOfText1 = new TextRange(log.Document.ContentEnd, log.Document.ContentEnd); + rangeOfText1.Text = Utils.RemoveLineEndings(printOut) + "\r"; + rangeOfText1.ApplyPropertyValue(TextElement.ForegroundProperty, new System.Windows.Media.SolidColorBrush(ForeColor)); + log.ScrollToEnd(); + })); + + } + + private async static Task WriteFileAsync(string txt) + { + if (AutoSave) await ErrorFile.WriteLineAsync(txt); + else return; + } + + private static bool IsForcePopup(bool forcePopup) + { + return forcePopup || ((status == null) && (log == null)); + } + + public async static void errorMsg(string errorText, int errorID, bool forcePopup = false) + { + if (IsForcePopup(forcePopup)) + { + MessageBox.Show(errorText, " Error message ("+errorID.ToString()+")"); + } + else + { + StatusLine("Error: "+errorText, Brushes.Red.Color); + } + string outText = outText = "(err:" + errorID.ToString() + ") " + errorText; + AppendLog(outText, Brushes.Red.Color); + await WriteFileAsync(outText); + } + + public async static void warningMsg(string warningText, int warningID = -1, bool forcePopup = false) + { + if (IsForcePopup(forcePopup)) + { + MessageBox.Show(warningText, " Warning message (" + warningID.ToString() + ")"); + return; + } + else + { + StatusLine("Warning: " + warningText, Brushes.Green.Color); + } + string outText = warningText; + if (warningID != -1) outText = "(wrn:" + warningID.ToString() + ") " + warningText; + AppendLog(outText, Brushes.Green.Color); + await WriteFileAsync(outText); + } + + public static void simpleMsg(string simpleText, bool forcePopup = false) + { + if (IsForcePopup(forcePopup)) + { + MessageBox.Show(simpleText, " MOTmaster Message"); + } + else + { + StatusLine("Status: " + simpleText + "\n", dftForeground); + btnReset.Visibility = Visibility.Hidden; + } + AppendLog(simpleText, dftForeground); + } + } + + class WarningException : Exception { public WarningException(string p) : base(p) { } } + + class ErrorException : Exception { public ErrorException(string message) : base(message) { }} +} diff --git a/MotMaster2/ExperimentData.cs b/MotMaster2/ExperimentData.cs new file mode 100644 index 00000000..08fcc46f --- /dev/null +++ b/MotMaster2/ExperimentData.cs @@ -0,0 +1,158 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using MOTMaster2.SequenceData; +using Newtonsoft.Json; + +namespace MOTMaster2 +{ + [Serializable,JsonObject] + public class ExperimentData + { + //Flag to save raw data or average from each segment + public bool SaveRawData { get; set; } + //Name to identify each experiment + public string ExperimentName {get; set;} + //Collects time indices for each segment of analog data as a tuple tStart,tEnd + public Dictionary> AnalogSegments { get; set; } + + public List IgnoredSegments { get; set; } + //Raw data recorded from each shot + List shotData = new List(); + //List of sequence parameters for each shot + List> shotParams = new List>(); + //Sampling rate for data + private int sampleRate = 200000; + public int SampleRate { get { return sampleRate; } set { sampleRate = value; } } + //Number of acquired samples + public int NSamples { get; set; } + private Random random = new Random(); + public string InterferometerStepName { get; set; } + //Rise time in seconds to be excluded from data + public double RiseTime { get; set; } + + private int preTrigSamples = 64; + public int PreTrigSamples { get { return preTrigSamples; } set { preTrigSamples = value; } } + + + public static double[] TransferFunc { get; set; } + + public ExperimentData() + { + + + } + + public Dictionary SegmentShot(double[,] rawData) + { + int riseSamples = (int)(RiseTime * SampleRate); + int imin; + int imax; + Dictionary segData = new Dictionary(); + foreach (KeyValuePair> entry in AnalogSegments.OrderBy(t => t.Value.Item1)) + { + if (!IgnoredSegments.Contains(entry.Key)) + { + imin = entry.Value.Item1 + riseSamples; + imax = entry.Value.Item2; + double[] data = new double[imax-imin]; + for (int i = imin; i < imax; i++) data[i-imin] = rawData[0,i]; + segData[entry.Key] = data; + } + else if (entry.Key == InterferometerStepName) + { + imin = entry.Value.Item1; + imax = entry.Value.Item2; + double[] accelData = new double[imax-imin]; + for (int i = imin; i < imax; i++) accelData[i - imin] = rawData[1, i]; + ConvertAccelerometerVoltage(ref segData, accelData); + } + } + return segData; + } + + /// + /// Converts the accelerometer voltage into acceleration and integrates it using the interferometer response function + /// + /// + /// + private void ConvertAccelerometerVoltage(ref Dictionary segData, double[] accelData) + { + double keff = 4 * Math.PI / (780 * 1e-9); + double accScale = 1.235976 * 1e-3 * 6 * 1e3 / 9.81;// V/ms^-2 + int nAccSamps = accelData.Length; + double accSum = 0.0; + //Uses the simple triangular form of the transfer function and trapezium rule to integrate + for (int i = 1; i < nAccSamps / 2; i++) accSum += i* accelData[i]; + for (int i = nAccSamps / 2 + 1; i < nAccSamps; i++) accSum += (nAccSamps - i) * accelData[i]; + + double accPhase = keff * accSum/(accScale * sampleRate * sampleRate); // 1/sampleRate comes from both transfer function and integration + + double accMean = accelData.Average(); + double accStd = 0.0; + for (int i = 0; i < accelData.Length; i++) accStd += accelData[i]*accelData[i]; + accStd = accStd/nAccSamps-1; + accStd = Math.Sqrt(accStd - accMean*accMean); + + segData["AccPhase"] = new double[] {accPhase}; + segData["AccMeanV"] = new double[] {accMean}; + segData["AccMeanA"] = new double[] {accMean/accScale}; + segData["AccStdV"] = new double[] {accStd}; + segData["AccStdA"] = new double[] {accStd/accScale}; + + } + //Useful when starting a new scan + public void ClearData() + { + shotData.Clear(); + shotParams.Clear(); + ExperimentName = ""; + } + + //Generates some fake data that is normally distributed about some mean value + public double[,] GenerateFakeData() + { + double[,] fakeData = new double[2,NSamples]; + for (int i = 0; i < 2; i++) + for (int j = 0; j < NSamples; j++) { double g = Gauss(0, 1); fakeData[i,j] = g; } + return fakeData; + } + + //Randomly generates normally distributed numbers using the BoxMuller transform + public double Gauss(double mean, double std) + { + double u = 2 * random.NextDouble() - 1; + double v = 2 * random.NextDouble() - 1; + double w = u * u + v * v; + if (w == 0 || w >= 1) return Gauss(mean, std); + double c = Math.Sqrt(-2 * Math.Log(w) / w); + return u * c * std + mean; + } + + } + + /// + /// Data from a single experiment shot + /// + [Serializable,JsonObject] + public struct ExperimentShot + { + //Index of run. Might not be needed if adding each to a list + public int runID; + + [JsonIgnore] + internal double[,] analogInData; + + public Dictionary analogSegments; + + public ExperimentShot(int id, double[,] data) + { + runID = id; + analogInData = data; + analogSegments = null; + } + } + +} diff --git a/MotMaster2/HardwareOptions.xaml b/MotMaster2/HardwareOptions.xaml new file mode 100644 index 00000000..6b097890 --- /dev/null +++ b/MotMaster2/HardwareOptions.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +