================================================================ CSharp Notes: ------------- The FW6Device Class implements the DPP device commands. (Ex. FW6Device deviceDppIO;) Getting Started: 1. Search for the DPP device (RS232, INET, WinUSB) See: (in Form1 Class) public void buttonFindUsbDevices_Click(object sender, EventArgs e) (in DPDevice Class) public static List PerformDeviceDetection() 2. Create a FW6Device instance for the DPP device type. if (device.InterfaceType == DPDevice.InterfaceTypes.usb) { textStatus.Text = "Connecting to USB device..."; deviceDppIO = (DPDeviceUsb)device; deviceDppIO.mcaChannels = 1024; // set default bRunTests = true; } else if (device.InterfaceType == DPDevice.InterfaceTypes.rs232) { textStatus.Text = "Connecting to RS232 device..."; deviceDppIO = (DPDeviceSerialFW6)device; deviceDppIO.mcaChannels = 1024; // set default bRunTests = true; } else if (device.InterfaceType == DPDevice.InterfaceTypes.ethernet) { textStatus.Text = "Connecting to Ethernet device..."; deviceDppIO = (DPDeviceEthernet)device; deviceDppIO.mcaChannels = 1024; // set default bRunTests = true; } 3. Connect to the DPP device. if (bRunTests) { try { success = deviceDppIO.ConnectForTesting(); // open device for testing if (success) { textStatus.Text = "Connected For Testing"; } else { textStatus.Text = "Connect Error"; return; } } catch { textStatus.Text = "Connect Error"; return; } } 4. Acquire Spectrum Data (See FW6Device Commands). 5. Disconnect the DPP device. deviceDppIO.DisconnectForTesting(); ================================================================ FW6Device Commands ================================================================ Create FW6Device Device Instance Create Ethernet FW6Device deviceDppIO = (DPDeviceEthernet)device; Create RS232 Serial Port FW6Device deviceDppIO = (DPDeviceSerialFW6)device; Create WinUSB FW6Device deviceDppIO = (DPDeviceUsb)device; Creata and Initialize FW6Device instance. FW6Device deviceDppIO = null; FW6Device Device Setup Connect to FW6Device deviceDppIO.ConnectForTesting(); Set Number of Channels deviceDppIO.mcaChannels = 1024; Disconnect FW6Device deviceDppIO.DisconnectForTesting(); DPP Configuration and Status Request packet: “Text Configuration” Send ASCII Command Text deviceDppIO.SendConfiguration(strCommands); // send general configuration deviceDppIO.SendConfiguration(strPresetTimeSave); // send presets Request packet: “Text Configuration Readback” Read Full Configuration, Except SCA Settings deviceDppIO.GetFullConfiguration(DppStatus.DEVICE_ID, DppStatus.PC5_PRESENT); Display Configuration Settings deviceDppIO.DisplayConfiguration(strCmdReadback); Read ASCII Command Text Verbatim (No filters or changes) deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); Spectrum Acquisition and Status Request packet: “Request Status Packet” deviceDppIO.GetRawStatus(ref readBuffer, out bytesRead); Request packet: “Enable MCA/MCS” deviceDppIO.StartDppData(); Request packet: “Disable MCA/MCS” deviceDppIO.PauseDppData(); Request packet: “Clear Spectrum” deviceDppIO.ClearDppData(); Request packet: “Request Spectrum” deviceDppIO.GetSpectrumData(ref readBuffer, out bytesRead);