├── DAQ32.png
├── DAQ32 PCB
├── DAQ32.brd
├── DAQ32.sch
├── DAQ32 Gerbers.zip
├── DAQ32 Schematic.png
└── EAGLE_CleanUp.bat
├── DAQ32 Software
├── CDM20600.exe
├── DAQ32_PC_Interface (ASCII at 16.384 kHz)
│ └── DAQ32_PC_Interface
│ │ ├── DAQ32_PC_Interface
│ │ ├── Osc_DLL.dll
│ │ ├── Properties
│ │ │ ├── Settings.settings
│ │ │ ├── Settings.Designer.cs
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ └── Resources.resx
│ │ ├── Program.cs
│ │ ├── scope_settings.ini
│ │ ├── VisualStudio_CleanUp.bat
│ │ ├── DAQ32serial.cs
│ │ ├── DAQ32_PC_Interface.csproj
│ │ ├── Form1.resx
│ │ └── Form1.cs
│ │ └── DAQ32_PC_Interface.sln
├── DAQ32_PC_Interface (binary at 32.768 kHz)
│ └── DAQ32_PC_Interface
│ │ ├── DAQ32_PC_Interface
│ │ ├── Osc_DLL.dll
│ │ ├── Properties
│ │ │ ├── Settings.settings
│ │ │ ├── Settings.Designer.cs
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ └── Resources.resx
│ │ ├── Program.cs
│ │ ├── scope_settings.ini
│ │ ├── VisualStudio_CleanUp.bat
│ │ ├── DAQ32serial.cs
│ │ ├── DAQ32_PC_Interface.csproj
│ │ ├── Form1.resx
│ │ └── Form1.cs
│ │ └── DAQ32_PC_Interface.sln
└── DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)
│ └── DAQ32_PC_Interface
│ ├── DAQ32_PC_Interface
│ ├── Osc_DLL.dll
│ ├── Osc_DLL_DOC.txt
│ ├── HardwareChip.ico
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── Program.cs
│ ├── scope_settings.ini
│ ├── VisualStudio_CleanUp.bat
│ ├── DAQ32serial.cs
│ ├── DAQ32_PC_Interface.csproj
│ └── Form1.cs
│ └── DAQ32_PC_Interface.sln
├── DAQ32 Firmware
├── DAQ32 Firmware (ASCII at 16.384 kHz)
│ ├── main.c
│ ├── DAQ32.mcw
│ ├── MPLAB_CleanUp.bat
│ ├── DAQ32.mcp
│ └── DAQ32.hex
└── DAQ32 Firmware (binary at 32.768 kHz)
│ ├── main.c
│ ├── DAQ32.mcw
│ ├── MPLAB_CleanUp.bat
│ ├── DAQ32.mcp
│ └── DAQ32.hex
├── README.md
├── .gitattributes
└── .gitignore
/DAQ32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32.png
--------------------------------------------------------------------------------
/DAQ32 PCB/DAQ32.brd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 PCB/DAQ32.brd
--------------------------------------------------------------------------------
/DAQ32 PCB/DAQ32.sch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 PCB/DAQ32.sch
--------------------------------------------------------------------------------
/DAQ32 PCB/DAQ32 Gerbers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 PCB/DAQ32 Gerbers.zip
--------------------------------------------------------------------------------
/DAQ32 Software/CDM20600.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/CDM20600.exe
--------------------------------------------------------------------------------
/DAQ32 PCB/DAQ32 Schematic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 PCB/DAQ32 Schematic.png
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/main.c
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/main.c
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/DAQ32.mcw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/DAQ32.mcw
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/DAQ32.mcw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/DAQ32.mcw
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL.dll
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL_DOC.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Osc_DLL_DOC.txt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | DAQ32
2 | =====
3 |
4 | 32 channel oscilloscope and data logger with selectable sample rates up to 32 kHz. See [original post](http://www.x-io.co.uk/daq32/) for details.
5 |
6 |
7 |

8 |
9 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/HardwareChip.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xioTechnologies/DAQ32/HEAD/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/HardwareChip.ico
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace DAQ32_PC_Interface
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// The main entry point for the application.
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | //Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new Form1());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace DAQ32_PC_Interface
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// The main entry point for the application.
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | //Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new Form1());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace DAQ32_PC_Interface
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// The main entry point for the application.
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | //Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new Form1());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/MPLAB_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove files generated by compiler in this directory and all subdirectories.
4 | REM Compiled *.hex file is kept.
5 |
6 | echo Removing "*.cof" files...
7 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.cof"') do del "%%i" /f /q
8 | echo.
9 |
10 | echo Removing "*.d" files...
11 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.d"') do del "%%i" /f /q
12 | echo.
13 |
14 | echo Removing "*.elf" files...
15 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.elf"') do del "%%i" /f /q
16 | echo.
17 |
18 | echo Removing "*.o" files...
19 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.o"') do del "%%i" /f /q
20 | echo.
21 |
22 | echo Removing "*.map" files...
23 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.map"') do del "%%i" /f /q
24 | echo.
25 |
26 | echo Removing "*.mcs" files...
27 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.mcs"') do del "%%i" /f /q
28 | echo.
29 |
30 | echo Removing "obj" directory...
31 | rd "%~p0obj" /s /q
32 | echo.
33 |
34 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/MPLAB_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove files generated by compiler in this directory and all subdirectories.
4 | REM Compiled *.hex file is kept.
5 |
6 | echo Removing "*.cof" files...
7 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.cof"') do del "%%i" /f /q
8 | echo.
9 |
10 | echo Removing "*.d" files...
11 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.d"') do del "%%i" /f /q
12 | echo.
13 |
14 | echo Removing "*.elf" files...
15 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.elf"') do del "%%i" /f /q
16 | echo.
17 |
18 | echo Removing "*.o" files...
19 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.o"') do del "%%i" /f /q
20 | echo.
21 |
22 | echo Removing "*.map" files...
23 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.map"') do del "%%i" /f /q
24 | echo.
25 |
26 | echo Removing "*.mcs" files...
27 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.mcs"') do del "%%i" /f /q
28 | echo.
29 |
30 | echo Removing "obj" directory...
31 | rd "%~p0obj" /s /q
32 | echo.
33 |
34 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAQ32_PC_Interface", "DAQ32_PC_Interface\DAQ32_PC_Interface.csproj", "{71B5021C-12F5-4E94-8974-C4BC2F43EA2A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Debug|x86 = Debug|x86
10 | Release|Any CPU = Release|Any CPU
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.ActiveCfg = Debug|x86
17 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.Build.0 = Debug|x86
18 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.ActiveCfg = Release|x86
21 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAQ32_PC_Interface", "DAQ32_PC_Interface\DAQ32_PC_Interface.csproj", "{71B5021C-12F5-4E94-8974-C4BC2F43EA2A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Debug|x86 = Debug|x86
10 | Release|Any CPU = Release|Any CPU
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.ActiveCfg = Debug|x86
17 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.Build.0 = Debug|x86
18 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.ActiveCfg = Release|x86
21 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/DAQ32.mcp:
--------------------------------------------------------------------------------
1 | [HEADER]
2 | magic_cookie={66E99B07-E706-4689-9E80-9B2582898A13}
3 | file_version=1.0
4 | device=dsPIC33FJ256GP710
5 | [PATH_INFO]
6 | BuildDirPolicy=BuildDirIsProjectDir
7 | dir_src=
8 | dir_bin=
9 | dir_tmp=
10 | dir_sin=
11 | dir_inc=
12 | dir_lib=C:\Program Files\Microchip\MPLAB C30\lib
13 | dir_lkr=
14 | [CAT_FILTERS]
15 | filter_src=*.s;*.c
16 | filter_inc=*.h;*.inc
17 | filter_obj=*.o
18 | filter_lib=*.a
19 | filter_lkr=*.gld
20 | [CAT_SUBFOLDERS]
21 | subfolder_src=
22 | subfolder_inc=
23 | subfolder_obj=
24 | subfolder_lib=
25 | subfolder_lkr=
26 | [FILE_SUBFOLDERS]
27 | file_000=.
28 | file_001=.
29 | [GENERATED_FILES]
30 | file_000=no
31 | file_001=no
32 | [OTHER_FILES]
33 | file_000=no
34 | file_001=no
35 | [FILE_INFO]
36 | file_000=main.c
37 | file_001=C:\Program Files (x86)\Microchip\MPLAB C30\support\dsPIC33F\h\p33FJ256GP710.h
38 | [SUITE_INFO]
39 | suite_guid={479DDE59-4D56-455E-855E-FFF59A3DB57E}
40 | suite_state=
41 | [TOOL_SETTINGS]
42 | TS{7D9C6ECE-785D-44CB-BA22-17BF2E119622}=-g
43 | TS{25AC22BD-2378-4FDB-BFB6-7345A15512D3}=-g -Wall
44 | TS{7DAC9A1D-4C45-45D6-B25A-D117C74E8F5A}=-o"$(BINDIR_)$(TARGETBASE).$(TARGETSUFFIX)" -Map="$(BINDIR_)$(TARGETBASE).map" --report-mem
45 | TS{509E5861-1E2A-483B-8B6B-CA8DB7F2DD78}=
46 | [INSTRUMENTED_TRACE]
47 | enable=0
48 | transport=0
49 | format=0
50 | [CUSTOM_BUILD]
51 | Pre-Build=
52 | Pre-BuildEnabled=1
53 | Post-Build=
54 | Post-BuildEnabled=1
55 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAQ32_PC_Interface", "DAQ32_PC_Interface\DAQ32_PC_Interface.csproj", "{71B5021C-12F5-4E94-8974-C4BC2F43EA2A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Debug|x86 = Debug|x86
10 | Release|Any CPU = Release|Any CPU
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.ActiveCfg = Debug|x86
17 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Debug|x86.Build.0 = Debug|x86
18 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.ActiveCfg = Release|x86
21 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}.Release|x86.Build.0 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/DAQ32.mcp:
--------------------------------------------------------------------------------
1 | [HEADER]
2 | magic_cookie={66E99B07-E706-4689-9E80-9B2582898A13}
3 | file_version=1.0
4 | device=dsPIC33FJ256GP710
5 | [PATH_INFO]
6 | BuildDirPolicy=BuildDirIsProjectDir
7 | dir_src=
8 | dir_bin=
9 | dir_tmp=
10 | dir_sin=
11 | dir_inc=
12 | dir_lib=C:\Program Files\Microchip\MPLAB C30\lib
13 | dir_lkr=
14 | [CAT_FILTERS]
15 | filter_src=*.s;*.c
16 | filter_inc=*.h;*.inc
17 | filter_obj=*.o
18 | filter_lib=*.a
19 | filter_lkr=*.gld
20 | [CAT_SUBFOLDERS]
21 | subfolder_src=
22 | subfolder_inc=
23 | subfolder_obj=
24 | subfolder_lib=
25 | subfolder_lkr=
26 | [FILE_SUBFOLDERS]
27 | file_000=.
28 | file_001=.
29 | file_002=.
30 | [GENERATED_FILES]
31 | file_000=no
32 | file_001=no
33 | file_002=no
34 | [OTHER_FILES]
35 | file_000=no
36 | file_001=no
37 | file_002=no
38 | [FILE_INFO]
39 | file_000=main.c
40 | file_001=C:\Program Files (x86)\Microchip\MPLAB C30\support\dsPIC33F\h\p33FJ256GP710.h
41 | file_002=C:\Program Files (x86)\Microchip\MPLAB C30\src\peripheral_30F_24H_33F\include\Generic.h
42 | [SUITE_INFO]
43 | suite_guid={479DDE59-4D56-455E-855E-FFF59A3DB57E}
44 | suite_state=
45 | [TOOL_SETTINGS]
46 | TS{7D9C6ECE-785D-44CB-BA22-17BF2E119622}=-g
47 | TS{25AC22BD-2378-4FDB-BFB6-7345A15512D3}=-g -Wall
48 | TS{7DAC9A1D-4C45-45D6-B25A-D117C74E8F5A}=-o"$(BINDIR_)$(TARGETBASE).$(TARGETSUFFIX)" -Map="$(BINDIR_)$(TARGETBASE).map" --report-mem
49 | TS{509E5861-1E2A-483B-8B6B-CA8DB7F2DD78}=
50 | [INSTRUMENTED_TRACE]
51 | enable=0
52 | transport=0
53 | format=0
54 | [CUSTOM_BUILD]
55 | Pre-Build=
56 | Pre-BuildEnabled=1
57 | Post-Build=
58 | Post-BuildEnabled=1
59 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/scope_settings.ini:
--------------------------------------------------------------------------------
1 | [Oscilloscope]
2 | OscVrulFontName=Arial
3 | OscVrulFontSize=8
4 | OscVrulFontStyleBold=0
5 | OscVrulFontStyleItalic=0
6 | OscBackColor=00000000
7 | OscGridColor=00404040
8 | OscHorScaleColor=000000FF
9 | OscBeam0Color=0000FF00
10 | OscBeam1Color=00FF00FF
11 | OscBeam2Color=0000FFFF
12 | OscVrulGenFontColor=000000FF
13 | OscZeroLineColor=00808080
14 | ShowSecondBeam=1
15 | ShowThirdBeam=1
16 | ShowTestButton=0
17 | BuffersRecordType=1
18 | CreateSecondBeam=1
19 | CreateThirdBeam=1
20 | SpreadViewTiming=0
21 | EventsProcDivider=0
22 | GridRefreshDivider=41
23 | GridCellPixelsSize=31
24 | TriggerEnable=0
25 | TriggerSource=0
26 | FirstTriggerLevel=2048.0000000000
27 | SecondTriggerLevel=2048.0000000000
28 | ThirdTriggerLevel=2048.0000000000
29 | ExtrnTriggerLevel=2048.0000000000
30 | TimeSamplesPerCell=100.0000000000
31 | Beam0VertScale=500.0000000000
32 | Beam1VertScale=500.0000000000
33 | Beam2VertScale=500.0000000000
34 | Beam0VertOffset=-2048.0000000000
35 | Beam1VertOffset=-2048.0000000000
36 | Beam2VertOffset=-2048.0000000000
37 | ScopeFormHeight=390
38 | ScopeFormWidth=640
39 | ScopeStayOnTop=0
40 | ShowTriggerControls=1
41 | ShowOscJaggies=0
42 | ShowOscHexVal=0
43 | ShowHexCheckBox=1
44 | ScopeShowAutoSweep=0
45 | ScopeAutoSweep=0
46 | ScopeAutoSweepDivider=4
47 | ScopeShowHints=0
48 | Producer_Vendor_Name=+972 507669424 Michael Bernstein, E_Mail: brnstin@cheerful.com
49 | BfrSmplSize=32000
50 | ScopeInputDumpSize=32000
51 | ScopePolylineOptimize=0
52 | [Miscellaneous]
53 | ReadDelayPerSample=0
54 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DAQ32_PC_Interface")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DAQ32_PC_Interface")]
13 | [assembly: AssemblyCopyright("Copyright © 2010")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e09c34da-e4c6-4cdd-b8a4-440332f87d50")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DAQ32_PC_Interface")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DAQ32_PC_Interface")]
13 | [assembly: AssemblyCopyright("Copyright © 2010")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e09c34da-e4c6-4cdd-b8a4-440332f87d50")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DAQ32_PC_Interface")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DAQ32_PC_Interface")]
13 | [assembly: AssemblyCopyright("Copyright © 2010")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e09c34da-e4c6-4cdd-b8a4-440332f87d50")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/scope_settings.ini:
--------------------------------------------------------------------------------
1 | [Oscilloscope]
2 | OscVrulFontName=Arial
3 | OscVrulFontSize=8
4 | OscVrulFontStyleBold=0
5 | OscVrulFontStyleItalic=0
6 | OscBackColor=00000000
7 | OscGridColor=00404040
8 | OscHorScaleColor=000000FF
9 | OscBeam0Color=0000FF00
10 | OscBeam1Color=00FF00FF
11 | OscBeam2Color=0000FFFF
12 | OscVrulGenFontColor=000000FF
13 | OscZeroLineColor=00808080
14 | OscOscCaption=Scope D - Channels: 9, 10, 11
15 | ShowSecondBeam=1
16 | ShowThirdBeam=1
17 | ShowTestButton=0
18 | BuffersRecordType=1
19 | CreateSecondBeam=1
20 | CreateThirdBeam=1
21 | SpreadViewTiming=0
22 | EventsProcDivider=0
23 | GridRefreshDivider=41
24 | GridCellPixelsSize=39
25 | TriggerEnable=0
26 | TriggerSource=0
27 | FirstTriggerLevel=2048.0000000000
28 | SecondTriggerLevel=2048.0000000000
29 | ThirdTriggerLevel=2048.0000000000
30 | ExtrnTriggerLevel=0.0000000000
31 | TimeSamplesPerCell=100.0000000000
32 | Beam0VertScale=500.0000000000
33 | Beam1VertScale=500.0000000000
34 | Beam2VertScale=500.0000000000
35 | Beam0VertOffset=-2000.0000000000
36 | Beam1VertOffset=-2000.0000000000
37 | Beam2VertOffset=-2000.0000000000
38 | ScopeFormTop=74
39 | ScopeFormLeft=68
40 | ScopeFormHeight=470
41 | ScopeFormWidth=632
42 | ScopeStayOnTop=0
43 | ShowTriggerControls=1
44 | ShowOscJaggies=0
45 | ShowOscHexVal=0
46 | ShowHexCheckBox=1
47 | ScopeShowAutoSweep=0
48 | ScopeAutoSweep=0
49 | ScopeAutoSweepDivider=4
50 | ScopeShowHints=0
51 | Producer_Vendor_Name=+972 507669424 Michael Bernstein, E_Mail: brnstin@cheerful.com
52 | BfrSmplSize=32000
53 | ScopeInputDumpSize=32000
54 | ScopePolylineOptimize=0
55 | [Miscellaneous]
56 | ReadDelayPerSample=0
57 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/scope_settings.ini:
--------------------------------------------------------------------------------
1 | [Oscilloscope]
2 | OscVrulFontName=Arial
3 | OscVrulFontSize=8
4 | OscVrulFontStyleBold=0
5 | OscVrulFontStyleItalic=0
6 | OscBackColor=00000000
7 | OscGridColor=00404040
8 | OscHorScaleColor=000000FF
9 | OscBeam0Color=0000FF00
10 | OscBeam1Color=00FF00FF
11 | OscBeam2Color=0000FFFF
12 | OscVrulGenFontColor=000000FF
13 | OscZeroLineColor=00808080
14 | OscOscCaption=Scope D - Channels: 9, 10, 11
15 | ShowSecondBeam=1
16 | ShowThirdBeam=1
17 | ShowTestButton=0
18 | BuffersRecordType=1
19 | CreateSecondBeam=1
20 | CreateThirdBeam=1
21 | SpreadViewTiming=0
22 | EventsProcDivider=0
23 | GridRefreshDivider=41
24 | GridCellPixelsSize=39
25 | TriggerEnable=0
26 | TriggerSource=0
27 | FirstTriggerLevel=2048.0000000000
28 | SecondTriggerLevel=2048.0000000000
29 | ThirdTriggerLevel=2048.0000000000
30 | ExtrnTriggerLevel=0.0000000000
31 | TimeSamplesPerCell=100.0000000000
32 | Beam0VertScale=500.0000000000
33 | Beam1VertScale=500.0000000000
34 | Beam2VertScale=500.0000000000
35 | Beam0VertOffset=-2000.0000000000
36 | Beam1VertOffset=-2000.0000000000
37 | Beam2VertOffset=-2000.0000000000
38 | ScopeFormTop=74
39 | ScopeFormLeft=68
40 | ScopeFormHeight=470
41 | ScopeFormWidth=632
42 | ScopeStayOnTop=0
43 | ShowTriggerControls=1
44 | ShowOscJaggies=0
45 | ShowOscHexVal=0
46 | ShowHexCheckBox=1
47 | ScopeShowAutoSweep=0
48 | ScopeAutoSweep=0
49 | ScopeAutoSweepDivider=4
50 | ScopeShowHints=0
51 | Producer_Vendor_Name=+972 507669424 Michael Bernstein, E_Mail: brnstin@cheerful.com
52 | BfrSmplSize=32000
53 | ScopeInputDumpSize=32000
54 | ScopePolylineOptimize=0
55 | [Miscellaneous]
56 | ReadDelayPerSample=0
57 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/VisualStudio_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove files generated by compiler in this directory and all subdirectories.
4 | REM Essential release files are kept.
5 |
6 | echo Removing "*.csproj.user" files...
7 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.csproj.user"') do del "%%i" /f /q
8 | echo.
9 |
10 | echo Removing "*.exe.config" files...
11 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.exe.config"') do del "%%i" /f /q
12 | echo.
13 |
14 | echo Removing "*.vshost.exe.config" files...
15 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.config"') do del "%%i" /f /q
16 | echo.
17 |
18 | echo Removing "*.pdb" files...
19 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.pdb"') do del "%%i" /f /q
20 | echo.
21 |
22 | echo Removing "*.vshost.application" files...
23 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.application"') do del "%%i" /f /q
24 | echo.
25 |
26 | echo Removing "*.vshost.exe" files...
27 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe "') do del "%%i" /f /q
28 | echo.
29 |
30 | echo Removing "*.vshost.exe.manifest" files...
31 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.manifest "') do del "%%i" /f /q
32 | echo.
33 |
34 | echo Removing "obj" directory...
35 | rd "%~p0obj" /s /q
36 | echo.
37 |
38 | echo Removing "Debug" directories recursively...
39 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*Debug"') do if "%%~ni"=="Debug" rd "%%i" /s /q
40 | echo.
41 |
42 | echo Removing "app.publish" directories recursively...
43 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*app.publish"') do rd "%%i" /s /q
44 | echo.
45 |
46 | echo Removing "*_mcr" directories recursively...
47 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*_mcr"') do rd "%%i" /s /q
48 | echo.
49 |
50 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/VisualStudio_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove files generated by compiler in this directory and all subdirectories.
4 | REM Essential release files are kept.
5 |
6 | echo Removing "*.csproj.user" files...
7 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.csproj.user"') do del "%%i" /f /q
8 | echo.
9 |
10 | echo Removing "*.exe.config" files...
11 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.exe.config"') do del "%%i" /f /q
12 | echo.
13 |
14 | echo Removing "*.vshost.exe.config" files...
15 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.config"') do del "%%i" /f /q
16 | echo.
17 |
18 | echo Removing "*.pdb" files...
19 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.pdb"') do del "%%i" /f /q
20 | echo.
21 |
22 | echo Removing "*.vshost.application" files...
23 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.application"') do del "%%i" /f /q
24 | echo.
25 |
26 | echo Removing "*.vshost.exe" files...
27 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe "') do del "%%i" /f /q
28 | echo.
29 |
30 | echo Removing "*.vshost.exe.manifest" files...
31 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.manifest "') do del "%%i" /f /q
32 | echo.
33 |
34 | echo Removing "obj" directory...
35 | rd "%~p0obj" /s /q
36 | echo.
37 |
38 | echo Removing "Debug" directories recursively...
39 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*Debug"') do if "%%~ni"=="Debug" rd "%%i" /s /q
40 | echo.
41 |
42 | echo Removing "app.publish" directories recursively...
43 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*app.publish"') do rd "%%i" /s /q
44 | echo.
45 |
46 | echo Removing "*_mcr" directories recursively...
47 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*_mcr"') do rd "%%i" /s /q
48 | echo.
49 |
50 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/VisualStudio_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove files generated by compiler in this directory and all subdirectories.
4 | REM Essential release files are kept.
5 |
6 | echo Removing "*.csproj.user" files...
7 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.csproj.user"') do del "%%i" /f /q
8 | echo.
9 |
10 | echo Removing "*.exe.config" files...
11 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.exe.config"') do del "%%i" /f /q
12 | echo.
13 |
14 | echo Removing "*.vshost.exe.config" files...
15 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.config"') do del "%%i" /f /q
16 | echo.
17 |
18 | echo Removing "*.pdb" files...
19 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.pdb"') do del "%%i" /f /q
20 | echo.
21 |
22 | echo Removing "*.vshost.application" files...
23 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.application"') do del "%%i" /f /q
24 | echo.
25 |
26 | echo Removing "*.vshost.exe" files...
27 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe "') do del "%%i" /f /q
28 | echo.
29 |
30 | echo Removing "*.vshost.exe.manifest" files...
31 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.vshost.exe.manifest "') do del "%%i" /f /q
32 | echo.
33 |
34 | echo Removing "obj" directory...
35 | rd "%~p0obj" /s /q
36 | echo.
37 |
38 | echo Removing "Debug" directories recursively...
39 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*Debug"') do if "%%~ni"=="Debug" rd "%%i" /s /q
40 | echo.
41 |
42 | echo Removing "app.publish" directories recursively...
43 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*app.publish"') do rd "%%i" /s /q
44 | echo.
45 |
46 | echo Removing "*_mcr" directories recursively...
47 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*_mcr"') do rd "%%i" /s /q
48 | echo.
49 |
50 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/DAQ32 PCB/EAGLE_CleanUp.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Remove back up files generated by EAGLE in this directory and all subdirectories.
4 |
5 | echo Removing "bmp.scr" files...
6 | for /f "delims==" %%i in ('dir /b /on /s "%~p0bmp.scr"') do del "%%i" /f /q
7 | echo.
8 |
9 | echo Removing "*.l#*" files...
10 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.l#*"') do del "%%i" /f /q
11 | echo.
12 |
13 | echo Removing "*.b#*" files...
14 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.b#*"') do del "%%i" /f /q
15 | echo.
16 |
17 | echo Removing "*.s#*" files...
18 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.s#*"') do del "%%i" /f /q
19 | echo.
20 |
21 | echo Removing "*.pro" files...
22 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.pro"') do del "%%i" /f /q
23 | echo.
24 |
25 | echo Removing "*.gpi" files...
26 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.gpi"') do del "%%i" /f /q
27 | echo.
28 |
29 | echo Removing "*.dri" files...
30 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.dri"') do del "%%i" /f /q
31 | echo.
32 |
33 | echo Removing "*.COP_BOT" files...
34 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.COP_BOT"') do del "%%i" /f /q
35 | echo.
36 |
37 | echo Removing "*.COP_TOP" files...
38 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.COP_TOP"') do del "%%i" /f /q
39 | echo.
40 |
41 | echo Removing "*.DRILL" files...
42 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.DRILL"') do del "%%i" /f /q
43 | echo.
44 |
45 | echo Removing "*.MILL" files...
46 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.MILL"') do del "%%i" /f /q
47 | echo.
48 |
49 | echo Removing "*.MSK_BOT" files...
50 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.MSK_BOT"') do del "%%i" /f /q
51 | echo.
52 |
53 | echo Removing "*.MSK_TOP" files...
54 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.MSK_TOP"') do del "%%i" /f /q
55 | echo.
56 |
57 | echo Removing "*.SLK_BOT" files...
58 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.SLK_BOT"') do del "%%i" /f /q
59 | echo.
60 |
61 | echo Removing "*.SLK_TOP" files...
62 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.SLK_TOP"') do del "%%i" /f /q
63 | echo.
64 |
65 | echo Removing "*.INFO_BOT" files...
66 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.INFO_BOT"') do del "%%i" /f /q
67 | echo.
68 |
69 | echo Removing "*.INFO_TOP" files...
70 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.INFO_TOP"') do del "%%i" /f /q
71 | echo.
72 |
73 | echo Removing "*.PST_BOT" files...
74 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.PST_BOT"') do del "%%i" /f /q
75 | echo.
76 |
77 | echo Removing "*.PST_TOP" files...
78 | for /f "delims==" %%i in ('dir /b /on /s "%~p0*.PST_TOP"') do del "%%i" /f /q
79 | echo.
80 |
81 | echo "%~n0.bat" done.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 | [Dd]ebug/
46 | [Rr]elease/
47 | *_i.c
48 | *_p.c
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.vspscc
63 | .builds
64 | *.dotCover
65 |
66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this
67 | #packages/
68 |
69 | # Visual C++ cache files
70 | ipch/
71 | *.aps
72 | *.ncb
73 | *.opensdf
74 | *.sdf
75 |
76 | # Visual Studio profiler
77 | *.psess
78 | *.vsp
79 |
80 | # ReSharper is a .NET coding add-in
81 | _ReSharper*
82 |
83 | # Installshield output folder
84 | [Ee]xpress
85 |
86 | # DocProject is a documentation generator add-in
87 | DocProject/buildhelp/
88 | DocProject/Help/*.HxT
89 | DocProject/Help/*.HxC
90 | DocProject/Help/*.hhc
91 | DocProject/Help/*.hhk
92 | DocProject/Help/*.hhp
93 | DocProject/Help/Html2
94 | DocProject/Help/html
95 |
96 | # Click-Once directory
97 | publish
98 |
99 | # Others
100 | [Bb]in
101 | [Oo]bj
102 | sql
103 | TestResults
104 | *.Cache
105 | ClientBin
106 | stylecop.*
107 | ~$*
108 | *.dbmdl
109 | Generated_Code #added for RIA/Silverlight projects
110 |
111 | # Backup & report files from converting an old project file to a newer
112 | # Visual Studio version. Backup files are not needed, because we have git ;-)
113 | _UpgradeReport_Files/
114 | Backup*/
115 | UpgradeLog*.XML
116 |
117 |
118 |
119 | ############
120 | ## Windows
121 | ############
122 |
123 | # Windows image file caches
124 | Thumbs.db
125 |
126 | # Folder config file
127 | Desktop.ini
128 |
129 |
130 | #############
131 | ## Python
132 | #############
133 |
134 | *.py[co]
135 |
136 | # Packages
137 | *.egg
138 | *.egg-info
139 | dist
140 | build
141 | eggs
142 | parts
143 | bin
144 | var
145 | sdist
146 | develop-eggs
147 | .installed.cfg
148 |
149 | # Installer logs
150 | pip-log.txt
151 |
152 | # Unit test / coverage reports
153 | .coverage
154 | .tox
155 |
156 | #Translations
157 | *.mo
158 |
159 | #Mr Developer
160 | .mr.developer.cfg
161 |
162 | # Mac crap
163 | .DS_Store
164 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DAQ32_PC_Interface.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DAQ32_PC_Interface.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.3607
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DAQ32_PC_Interface.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DAQ32_PC_Interface.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32serial.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO.Ports;
6 |
7 | namespace DAQ32_PC_Interface
8 | {
9 | public class DAQ32data
10 | {
11 | public string CSVline;
12 | public ushort[] chan;
13 | public int numChan;
14 | public double sampleRate;
15 | public int packetCnt;
16 | public int errorCnt;
17 |
18 | public DAQ32data()
19 | {
20 | CSVline = "";
21 | chan = new ushort[32] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
22 | numChan = 0;
23 | sampleRate = 0.0;
24 | packetCnt = 0;
25 | errorCnt = 0;
26 | }
27 | }
28 |
29 | public class DAQ32serial
30 | {
31 | private SerialPort com;
32 | private DAQ32data data;
33 |
34 | public DAQ32serial(string COMport)
35 | {
36 | com = new SerialPort(COMport, 921600, Parity.None, 8, StopBits.One);
37 | com.Handshake = Handshake.RequestToSend;
38 | com.ReceivedBytesThreshold = 1;
39 | com.DataReceived += new SerialDataReceivedEventHandler(com_DataReceived);
40 | data = new DAQ32data();
41 | com.Open();
42 | }
43 |
44 | public void Close()
45 | {
46 | try { com.Close(); }
47 | catch { }
48 | }
49 |
50 | void com_DataReceived(object sender, SerialDataReceivedEventArgs e)
51 | {
52 | int numToRead = com.BytesToRead; // get the number of bytes in the serial buffer
53 | byte[] serialBuf = new byte[numToRead]; // local array to hold bytes in the serial buffer
54 | com.Read(serialBuf, 0, numToRead); // transfer bytes
55 | for (int i = 0; i < numToRead; i++)
56 | {
57 | data.CSVline += (char)serialBuf[i]; // add received byte to string
58 | if (serialBuf[i] == '\r') // if termination char
59 | {
60 | string[] vars = data.CSVline.Split(','); // seporate CSVs
61 | try // attemped packet decoding...
62 | {
63 | if (vars.Length != data.numChan) // if numChan changed since last frame
64 | {
65 | data.numChan = vars.Length; // store nummber of channels
66 | throw new Exception(); // do not proceed, this is an error
67 | }
68 | for (int j = 0; j < vars.Length; j++)
69 | {
70 | uint tempInt = Convert.ToUInt32(vars[j]); // convert ASCII to uint32
71 | if (tempInt < 4096) data.chan[j] = (ushort)tempInt; // store if converted value is uint12
72 | else throw new Exception(); // else do not proceed, this is an error
73 | }
74 | data.sampleRate = 16384.0 / (double)data.numChan; // calculate sample rate
75 | data.packetCnt++; // increment packet counter
76 | OnPacketReceived(data); // trigger event
77 | }
78 | catch // packet decoding error
79 | {
80 | data.errorCnt++; // increment error counter
81 | OnPacketError(new EventArgs()); // trigger event
82 | }
83 | data.CSVline = ""; // reset buffer
84 | }
85 | }
86 | }
87 |
88 | public delegate void onDataPacketReceived(object sender, DAQ32data e);
89 | public event onDataPacketReceived packetReceived;
90 | protected virtual void OnPacketReceived(DAQ32data e) { if (packetReceived != null) packetReceived(this, e); }
91 |
92 | public delegate void onDataPacketError(object sender, EventArgs e);
93 | public event onDataPacketError packetError;
94 | protected virtual void OnPacketError(EventArgs e) { if (packetError != null) packetError(this, e); }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32serial.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO.Ports;
6 |
7 | namespace DAQ32_PC_Interface
8 | {
9 | public class DAQ32data
10 | {
11 | public string CSVline;
12 | public ushort[] chan;
13 | public int numChan;
14 | public double sampleRate;
15 | public int packetCnt;
16 | public int errorCnt;
17 |
18 | public DAQ32data()
19 | {
20 | CSVline = "";
21 | chan = new ushort[32] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
22 | numChan = 0;
23 | sampleRate = 0.0;
24 | packetCnt = 0;
25 | errorCnt = 0;
26 | }
27 | }
28 |
29 | public class DAQ32serial
30 | {
31 | private SerialPort com;
32 | private DAQ32data data;
33 | private byte[] RXbuf = new byte[256];
34 | private byte RXbufIndex = 0;
35 |
36 | public DAQ32serial(string COMport)
37 | {
38 | com = new SerialPort(COMport, 921600, Parity.None, 8, StopBits.One);
39 | com.Handshake = Handshake.RequestToSend;
40 | com.ReceivedBytesThreshold = 1;
41 | com.DataReceived += new SerialDataReceivedEventHandler(com_DataReceived);
42 | data = new DAQ32data();
43 | com.Open();
44 | }
45 |
46 | public void Close()
47 | {
48 | try { com.Close(); }
49 | catch { }
50 | }
51 |
52 | void com_DataReceived(object sender, SerialDataReceivedEventArgs e)
53 | {
54 | int numToRead = com.BytesToRead; // get the number of bytes in the serial buffer
55 | byte[] serialBuf = new byte[numToRead]; // local array to hold bytes in the serial buffer
56 | com.Read(serialBuf, 0, numToRead); // transfer bytes
57 |
58 | for (int i = 0; i < numToRead; i++)
59 | {
60 | if ((serialBuf[i] & (byte)128) == 128) // if byte represents start of packet
61 | {
62 | try
63 | {
64 | if ((RXbufIndex % 2) != 0) throw new Exception(); // if odd number of bytes in packet, do not proceed
65 | if ((RXbufIndex / 2) != data.numChan) // if numChan changed since last frame
66 | {
67 | data.numChan = RXbufIndex / 2; // store nummber of channels
68 | if (data.numChan != 0) throw new Exception(); // do not proceed (special case: first ever packet
69 | }
70 | RXbuf[0] = (byte)(RXbuf[0] & (byte)127); // clear framing bit of first byte
71 | data.CSVline = "";
72 | for (int j = 0; j < data.numChan; j++)
73 | {
74 | ushort temp = 0;
75 | temp = (ushort)(RXbuf[2 * j] & (byte)127); ; // temp lower byte = RXbuf with MSB cleared
76 | temp <<= 7; // shift to bits 7-11
77 | temp |= (ushort)(RXbuf[(2 * j) + 1] & (byte)127); // temp lower byte = RXbuf not inc. MSB
78 | data.chan[j] = temp;
79 | if (j != 0) data.CSVline += ",";
80 | data.CSVline += Convert.ToString(temp);
81 | }
82 | data.sampleRate = 32768.0 / (double)data.numChan; // calculate sample rate
83 | data.packetCnt++;
84 | OnPacketReceived(data); // trigger event
85 | }
86 | catch // packet error
87 | {
88 | data.errorCnt++; // increment error counter
89 | OnPacketError(new EventArgs()); // trigger event
90 | }
91 | RXbufIndex = 0; // reset RX buffer index
92 | }
93 | RXbuf[RXbufIndex++] = serialBuf[i]; // add new byte to RX buffer
94 | }
95 | }
96 |
97 | public delegate void onDataPacketReceived(object sender, DAQ32data e);
98 | public event onDataPacketReceived packetReceived;
99 | protected virtual void OnPacketReceived(DAQ32data e) { if (packetReceived != null) packetReceived(this, e); }
100 |
101 | public delegate void onDataPacketError(object sender, EventArgs e);
102 | public event onDataPacketError packetError;
103 | protected virtual void OnPacketError(EventArgs e) { if (packetError != null) packetError(this, e); }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32serial.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO.Ports;
6 |
7 | namespace DAQ32_PC_Interface
8 | {
9 | public class DAQ32data
10 | {
11 | public string CSVline;
12 | public ushort[] chan;
13 | public int numChan;
14 | public double sampleRate;
15 | public int packetCnt;
16 | public int errorCnt;
17 |
18 | public DAQ32data()
19 | {
20 | CSVline = "";
21 | chan = new ushort[32] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
22 | numChan = 0;
23 | sampleRate = 0.0;
24 | packetCnt = 0;
25 | errorCnt = 0;
26 | }
27 | }
28 |
29 | public class DAQ32serial
30 | {
31 | private SerialPort com;
32 | private DAQ32data data;
33 | private byte[] RXbuf = new byte[256];
34 | private byte RXbufIndex = 0;
35 |
36 | public DAQ32serial(string COMport)
37 | {
38 | com = new SerialPort(COMport, 921600, Parity.None, 8, StopBits.One);
39 | com.Handshake = Handshake.RequestToSend;
40 | com.ReceivedBytesThreshold = 1;
41 | com.DataReceived += new SerialDataReceivedEventHandler(com_DataReceived);
42 | data = new DAQ32data();
43 | com.Open();
44 | }
45 |
46 | public void Close()
47 | {
48 | try { com.Close(); }
49 | catch { }
50 | }
51 |
52 | void com_DataReceived(object sender, SerialDataReceivedEventArgs e)
53 | {
54 | int numToRead = com.BytesToRead; // get the number of bytes in the serial buffer
55 | byte[] serialBuf = new byte[numToRead]; // local array to hold bytes in the serial buffer
56 | com.Read(serialBuf, 0, numToRead); // transfer bytes
57 |
58 | for (int i = 0; i < numToRead; i++)
59 | {
60 | if ((serialBuf[i] & (byte)128) == 128) // if byte represents start of packet
61 | {
62 | try
63 | {
64 | if ((RXbufIndex % 2) != 0) throw new Exception(); // if odd number of bytes in packet, do not proceed
65 | if ((RXbufIndex / 2) != data.numChan) // if numChan changed since last frame
66 | {
67 | data.numChan = RXbufIndex / 2; // store nummber of channels
68 | if (data.numChan != 0) throw new Exception(); // do not proceed (special case: first ever packet
69 | }
70 | RXbuf[0] = (byte)(RXbuf[0] & (byte)127); // clear framing bit of first byte
71 | data.CSVline = "";
72 | for (int j = 0; j < data.numChan; j++)
73 | {
74 | ushort temp = 0;
75 | temp = (ushort)(RXbuf[2 * j] & (byte)127); ; // temp lower byte = RXbuf with MSB cleared
76 | temp <<= 7; // shift to bits 7-11
77 | temp |= (ushort)(RXbuf[(2 * j) + 1] & (byte)127); // temp lower byte = RXbuf not inc. MSB
78 | data.chan[j] = temp;
79 | if (j != 0) data.CSVline += ",";
80 | data.CSVline += Convert.ToString(temp);
81 | }
82 | data.CSVline += "\r";
83 | data.sampleRate = 32768.0 / (double)data.numChan; // calculate sample rate
84 | data.packetCnt++;
85 | OnPacketReceived(data); // trigger event
86 | }
87 | catch // packet error
88 | {
89 | data.errorCnt++; // increment error counter
90 | OnPacketError(new EventArgs()); // trigger event
91 | }
92 | RXbufIndex = 0; // reset RX buffer index
93 | }
94 | RXbuf[RXbufIndex++] = serialBuf[i]; // add new byte to RX buffer
95 | }
96 | }
97 |
98 | public delegate void onDataPacketReceived(object sender, DAQ32data e);
99 | public event onDataPacketReceived packetReceived;
100 | protected virtual void OnPacketReceived(DAQ32data e) { if (packetReceived != null) packetReceived(this, e); }
101 |
102 | public delegate void onDataPacketError(object sender, EventArgs e);
103 | public event onDataPacketError packetError;
104 | protected virtual void OnPacketError(EventArgs e) { if (packetError != null) packetError(this, e); }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32_PC_Interface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 9.0.21022
7 | 2.0
8 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}
9 | WinExe
10 | Properties
11 | DAQ32_PC_Interface
12 | DAQ32_PC_Interface
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 | bin\x86\
35 |
36 |
37 | true
38 | bin\x86\Debug\
39 | DEBUG;TRACE
40 | full
41 | x86
42 | prompt
43 |
44 |
45 | bin\x86\Release\
46 | TRACE
47 | true
48 | pdbonly
49 | x86
50 | prompt
51 |
52 |
53 | bin\x86\x86\
54 | x86
55 |
56 |
57 |
58 |
59 | 3.5
60 |
61 |
62 | 3.5
63 |
64 |
65 | 3.5
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Form
77 |
78 |
79 | Form1.cs
80 |
81 |
82 |
83 |
84 |
85 | Form1.cs
86 | Designer
87 |
88 |
89 | ResXFileCodeGenerator
90 | Resources.Designer.cs
91 | Designer
92 |
93 |
94 | True
95 | Resources.resx
96 |
97 |
98 | SettingsSingleFileGenerator
99 | Settings.Designer.cs
100 |
101 |
102 |
103 | True
104 | Settings.settings
105 | True
106 |
107 |
108 |
109 |
110 |
111 |
112 |
119 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32_PC_Interface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 9.0.21022
7 | 2.0
8 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}
9 | WinExe
10 | Properties
11 | DAQ32_PC_Interface
12 | DAQ32_PC_Interface
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 | bin\x86\
35 |
36 |
37 | true
38 | bin\x86\Debug\
39 | DEBUG;TRACE
40 | full
41 | x86
42 | prompt
43 |
44 |
45 | bin\x86\Release\
46 | TRACE
47 | true
48 | pdbonly
49 | x86
50 | prompt
51 |
52 |
53 | bin\x86\x86\
54 | x86
55 |
56 |
57 |
58 |
59 | 3.5
60 |
61 |
62 | 3.5
63 |
64 |
65 | 3.5
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Form
77 |
78 |
79 | Form1.cs
80 |
81 |
82 |
83 |
84 |
85 | Form1.cs
86 | Designer
87 |
88 |
89 | ResXFileCodeGenerator
90 | Resources.Designer.cs
91 | Designer
92 |
93 |
94 | True
95 | Resources.resx
96 |
97 |
98 | SettingsSingleFileGenerator
99 | Settings.Designer.cs
100 |
101 |
102 |
103 | True
104 | Settings.settings
105 | True
106 |
107 |
108 |
109 |
110 |
111 |
112 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/DAQ32_PC_Interface.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 9.0.21022
7 | 2.0
8 | {71B5021C-12F5-4E94-8974-C4BC2F43EA2A}
9 | WinExe
10 | Properties
11 | DAQ32_PC_Interface
12 | DAQ32_PC_Interface
13 | v3.5
14 | 512
15 | HardwareChip.ico
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 | bin\x86\
36 |
37 |
38 | true
39 | bin\x86\Debug\
40 | DEBUG;TRACE
41 | full
42 | x86
43 | prompt
44 |
45 |
46 | bin\x86\Release\
47 | TRACE
48 | true
49 | pdbonly
50 | x86
51 | prompt
52 |
53 |
54 | bin\x86\x86\
55 | x86
56 |
57 |
58 |
59 |
60 | 3.5
61 |
62 |
63 | 3.5
64 |
65 |
66 | 3.5
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | Form
78 |
79 |
80 | Form1.cs
81 |
82 |
83 |
84 |
85 |
86 | Form1.cs
87 | Designer
88 |
89 |
90 | ResXFileCodeGenerator
91 | Resources.Designer.cs
92 | Designer
93 |
94 |
95 | True
96 | Resources.resx
97 |
98 |
99 | SettingsSingleFileGenerator
100 | Settings.Designer.cs
101 |
102 |
103 | PreserveNewest
104 |
105 |
106 | True
107 | Settings.settings
108 | True
109 |
110 |
111 |
112 |
113 |
114 | PreserveNewest
115 |
116 |
117 |
118 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (binary at 32.768 kHz)/DAQ32.hex:
--------------------------------------------------------------------------------
1 | :020000040000fa
2 | :080000000002040000000000f2
3 | :020000040000fa
4 | :100400000f91200000fe270000018800000000007e
5 | :100410000c00070020502000010020001100070000
6 | :10042000000020000000e000020032000000020096
7 | :1004300000000000b0020200000000000040da00ee
8 | :100440000000fe004440a900000220000000e0007f
9 | :100450000300320000002000a00188004440a800f2
10 | :100460000000060091018800800078000000eb0089
11 | :1004700015003700e280400032a0b4009101ba00bc
12 | :10048000e280400032a0b4009102ba00e280400055
13 | :1004900032a0b4000002eb00472bde00f507b200eb
14 | :1004a000602ce10004003a000059eb008301e900f0
15 | :1004b000fdff3e00040037006128e100010032002a
16 | :1004c0000082eb00040007001101ba000200e00006
17 | :1004d000e8ff3a00000006003159ba008301e90044
18 | :1004e0000c0032002159ba008301e90008003200f3
19 | :1004f0000400e00003003a00e280400032a0b400b3
20 | :10050000f5ff370011d9ba008301e900faff3a007c
21 | :100510008100e800e180400032a0b4000000060045
22 | :020000040000fa
23 | :0200000401f009
24 | :04000c00f9ff0000f8
25 | :020000040000fa
26 | :0200000401f009
27 | :040014007fff00006a
28 | :020000040000fa
29 | :10000800220500002205000022050000220500004c
30 | :10001800220500002205000022050000220500003c
31 | :10002800220500002205000022050000220500002c
32 | :10003800220500002205000022050000220500001c
33 | :10004800220500002205000022050000ec04000043
34 | :10005800ba04000022050000220500002205000065
35 | :1000680022050000220500002205000022050000ec
36 | :1000780022050000220500002205000022050000dc
37 | :1000880022050000220500002205000022050000cc
38 | :1000980022050000220500002205000022050000bc
39 | :1000a80022050000220500002205000022050000ac
40 | :1000b800220500002205000022050000220500009c
41 | :1000c800220500002205000022050000220500008c
42 | :1000d800220500002205000022050000220500007c
43 | :1000e800220500002205000022050000220500006c
44 | :1000f800220500002205000022050000220500005c
45 | :10010800220500002205000022050000220500004b
46 | :10011800220500002205000022050000220500003b
47 | :10012800220500002205000022050000220500002b
48 | :10013800220500002205000022050000220500001b
49 | :10014800220500002205000022050000220500000b
50 | :1001580022050000220500002205000022050000fb
51 | :1001680022050000220500002205000022050000eb
52 | :1001780022050000220500002205000022050000db
53 | :1001880022050000220500002205000022050000cb
54 | :1001980022050000220500002205000022050000bb
55 | :1001a80022050000220500002205000022050000ab
56 | :1001b800220500002205000022050000220500009b
57 | :1001c800220500002205000022050000220500008b
58 | :1001d800220500002205000022050000220500007b
59 | :1001e800220500002205000022050000220500006b
60 | :0801f8002205000022050000b1
61 | :020000040000fa
62 | :10020800220500002205000022050000220500004a
63 | :10021800220500002205000022050000220500003a
64 | :10022800220500002205000022050000220500002a
65 | :10023800220500002205000022050000220500001a
66 | :10024800220500002205000022050000ec04000041
67 | :10025800ba04000022050000220500002205000063
68 | :1002680022050000220500002205000022050000ea
69 | :1002780022050000220500002205000022050000da
70 | :1002880022050000220500002205000022050000ca
71 | :1002980022050000220500002205000022050000ba
72 | :1002a80022050000220500002205000022050000aa
73 | :1002b800220500002205000022050000220500009a
74 | :1002c800220500002205000022050000220500008a
75 | :1002d800220500002205000022050000220500007a
76 | :1002e800220500002205000022050000220500006a
77 | :1002f800220500002205000022050000220500005a
78 | :100308002205000022050000220500002205000049
79 | :100318002205000022050000220500002205000039
80 | :100328002205000022050000220500002205000029
81 | :100338002205000022050000220500002205000019
82 | :100348002205000022050000220500002205000009
83 | :1003580022050000220500002205000022050000f9
84 | :1003680022050000220500002205000022050000e9
85 | :1003780022050000220500002205000022050000d9
86 | :1003880022050000220500002205000022050000c9
87 | :1003980022050000220500002205000022050000b9
88 | :1003a80022050000220500002205000022050000a9
89 | :1003b8002205000022050000220500002205000099
90 | :1003c8002205000022050000220500002205000089
91 | :1003d8002205000022050000220500002205000079
92 | :1003e8002205000022050000220500002205000069
93 | :0803f8002205000022050000af
94 | :020000040000fa
95 | :1005200016170000181900001a1b00001c1d0000ff
96 | :100530001e1f00001011000012130000141500000f
97 | :10054000050400000302000001000000060700008f
98 | :10055000080900000a0b00000c0d00000e0f00003f
99 | :020000040000fa
100 | :100560000400fa000000eb00101688000000eb0009
101 | :10057000401688000000eb00701688000000eb00b9
102 | :10058000a01688000000eb00d01688000000eb00e9
103 | :10059000001788000000eb00301788000000eb0017
104 | :1005a000201688000000eb00501688000000eb00c9
105 | :1005b000801688000000eb00b01688000000eb00f9
106 | :1005c000e01688000000eb00101788000080eb00a8
107 | :1005d000001688000080eb00301688000080eb00d9
108 | :1005e00060168800f0ff2700901688000080eb005e
109 | :1005f000c016880070ff2f00f01688000000eb0086
110 | :10060000501988000000eb0060198800103a800043
111 | :10061000000178000210a000610420007005200095
112 | :10062000237420008149780080497800824978004d
113 | :1006300081e0a800417420009140780000ceb30012
114 | :1006400000c0600044e7b700313a800000e02f00ae
115 | :1006500000806000e001b300303a880044c7bf006a
116 | :10066000f043b20044e7b7000000eb00001188003f
117 | :1006700010002000401188001122200091407800d5
118 | :10068000c0cfb30000c060000014a00021e2b7009a
119 | :1006900021e2a8002342a800aac0bf007040b30016
120 | :1006a000aae0b700910a200091407800f0c8b3009a
121 | :1006b00000c060000044a000a9e0b7009560a80059
122 | :1006c0000000eb00001988000000eb001019880002
123 | :1006d0000000eb00201988002183a8002143a80016
124 | :1006e000013220009140780000ceb30000c07000bd
125 | :1006f00020e3b7002043a800213220009140780079
126 | :1007000030ccb30000c06000c041b30022e3b700aa
127 | :1007100030c0b30024e3b70051322000914078008c
128 | :1007200000ceb30000c060006040b30025e3b70016
129 | :10073000813220009140780000ceb30000c06000fc
130 | :100740006041b30028e3b70021e3a8000000eb00fc
131 | :10075000001c880000302000401c88007000200031
132 | :10076000501c8800d0002000101c8800007f200052
133 | :10077000201c880081e3a8000000eb00200888000e
134 | :100780000421a8000000eb000008880005e1a80093
135 | :100790000228ef00d502ae000208a800d522ae0064
136 | :1007a0000228a800d542ae000248a800d562ae00db
137 | :1007b0000268a800d402ae000288a80001088000e8
138 | :1007c00030408000808f5000fcff32000008800025
139 | :1007d0003040880080ff83006101b80090ff8300f3
140 | :1007e000010020000201400083814800a0ff830037
141 | :1007f000010020000201400083814800b0ff830017
142 | :10080000010020000201400083814800c0ff8300f6
143 | :10081000010020000201400083814800d0ff8300d6
144 | :10082000010020000201400083814800e0ff8300b6
145 | :10083000010020000201400083814800f0ff830096
146 | :1008400001002000020040008380480040408800f2
147 | :100850005140880040408000514080004d09dd003b
148 | :100860004300de0000007100c308de006040880025
149 | :1008700060408000704088007040800000004000b0
150 | :1008800070408800604080000074a1000ee8b7004e
151 | :10089000204080000000e00001003a000fe8a800be
152 | :1008a00000c8bf008080fb00f28020001241780069
153 | :1008b0000081200000804000024878000068ec00c1
154 | :1008c0009580ae008580a8009580a80000c8bf0074
155 | :1008d0008080fb00e280200012417800008120002f
156 | :1008e00000804000024878000068ec009580ae006f
157 | :1008f0008580a8009580a8002340800013079800f9
158 | :10090000104080008040eb00014f78001e019000f5
159 | :10091000800f51000200390013c0b300034f78006c
160 | :100920009e0090000100e800204088001e417800f1
161 | :100930000204e000020032000000eb0020408800ca
162 | :1009400021408000002928000080400010407800ed
163 | :100950007f4060007f41600081322000914078003c
164 | :1009600000ceb30000c060000240700028e3b70072
165 | :1009700087ff3700809fbe003400f8000000200091
166 | :10098000a00188000000fa008580a90011802000e5
167 | :100990009140780000c8bf0080cf500009003200ad
168 | :1009a00001c8bf008080fb00008120000080400063
169 | :1009b000104078000080fb00201188000168ec00e6
170 | :1009c000010037009580a9000080fa003400f9008a
171 | :1009d0004f00be00004006003400f800881f780079
172 | :1009e00008002000a80188004f0478000000fa00e9
173 | :1009f0002682bf008560a9000080fa003400f9005b
174 | :040a000000400600ac
175 | :020000040000fa
176 | :100a040010080000000100000000000000080000c1
177 | :100a140008000000020000000000000000000000c8
178 | :100a240000000000f07f0000100000000000000043
179 | :100a3400080800000800000000000000000000009a
180 | :020000040000fa
181 | :040a44000000fe00b0
182 | :00000001FF
183 |
--------------------------------------------------------------------------------
/DAQ32 Firmware/DAQ32 Firmware (ASCII at 16.384 kHz)/DAQ32.hex:
--------------------------------------------------------------------------------
1 | :020000040000fa
2 | :080000000002040000000000f2
3 | :020000040000fa
4 | :10040000cf90200000fd27000001880000000000c0
5 | :100410000c00070080602000010020001100070090
6 | :10042000000020000000e000020032000000020096
7 | :1004300000000000ba020200000000000040da00e4
8 | :100440000000fe004440a900a00220000000e000df
9 | :100450000300320000002000a00188004440a800f2
10 | :100460000000060091018800800078000000eb0089
11 | :1004700015003700e280400032a0b4009101ba00bc
12 | :10048000e280400032a0b4009102ba00e280400055
13 | :1004900032a0b4000002eb00472bde00f507b200eb
14 | :1004a000602ce10004003a000059eb008301e900f0
15 | :1004b000fdff3e00040037006128e100010032002a
16 | :1004c0000082eb00040007001101ba000200e00006
17 | :1004d000e8ff3a00000006003159ba008301e90044
18 | :1004e0000c0032002159ba008301e90008003200f3
19 | :1004f0000400e00003003a00e280400032a0b400b3
20 | :10050000f5ff370011d9ba008301e900faff3a007c
21 | :100510008100e800e180400032a0b4000000060045
22 | :020000040000fa
23 | :0200000401f009
24 | :04000c00f9ff0000f8
25 | :020000040000fa
26 | :0200000401f009
27 | :04001000fbff0000f2
28 | :020000040000fa
29 | :0200000401f009
30 | :040014007fff00006a
31 | :020000040000fa
32 | :100008002606000026060000260600002606000038
33 | :100018002606000026060000260600002606000028
34 | :100028002606000026060000260600002606000018
35 | :100038002606000026060000260600002606000008
36 | :10004800260600002606000026060000f20500002d
37 | :10005800c00500002606000026060000260600004f
38 | :1000680026060000260600002606000026060000d8
39 | :1000780026060000260600002606000026060000c8
40 | :1000880026060000260600002606000026060000b8
41 | :1000980026060000260600002606000026060000a8
42 | :1000a8002606000026060000260600002606000098
43 | :1000b8002606000026060000260600002606000088
44 | :1000c8002606000026060000260600002606000078
45 | :1000d8002606000026060000260600002606000068
46 | :1000e8002606000026060000260600002606000058
47 | :1000f8002606000026060000260600002606000048
48 | :100108002606000026060000260600002606000037
49 | :100118002606000026060000260600002606000027
50 | :100128002606000026060000260600002606000017
51 | :100138002606000026060000260600002606000007
52 | :1001480026060000260600002606000026060000f7
53 | :1001580026060000260600002606000026060000e7
54 | :1001680026060000260600002606000026060000d7
55 | :1001780026060000260600002606000026060000c7
56 | :1001880026060000260600002606000026060000b7
57 | :1001980026060000260600002606000026060000a7
58 | :1001a8002606000026060000260600002606000097
59 | :1001b8002606000026060000260600002606000087
60 | :1001c8002606000026060000260600002606000077
61 | :1001d8002606000026060000260600002606000067
62 | :1001e8002606000026060000260600002606000057
63 | :0801f8002606000026060000a7
64 | :020000040000fa
65 | :100208002606000026060000260600002606000036
66 | :100218002606000026060000260600002606000026
67 | :100228002606000026060000260600002606000016
68 | :100238002606000026060000260600002606000006
69 | :10024800260600002606000026060000f20500002b
70 | :10025800c00500002606000026060000260600004d
71 | :1002680026060000260600002606000026060000d6
72 | :1002780026060000260600002606000026060000c6
73 | :1002880026060000260600002606000026060000b6
74 | :1002980026060000260600002606000026060000a6
75 | :1002a8002606000026060000260600002606000096
76 | :1002b8002606000026060000260600002606000086
77 | :1002c8002606000026060000260600002606000076
78 | :1002d8002606000026060000260600002606000066
79 | :1002e8002606000026060000260600002606000056
80 | :1002f8002606000026060000260600002606000046
81 | :100308002606000026060000260600002606000035
82 | :100318002606000026060000260600002606000025
83 | :100328002606000026060000260600002606000015
84 | :100338002606000026060000260600002606000005
85 | :1003480026060000260600002606000026060000f5
86 | :1003580026060000260600002606000026060000e5
87 | :1003680026060000260600002606000026060000d5
88 | :1003780026060000260600002606000026060000c5
89 | :1003880026060000260600002606000026060000b5
90 | :1003980026060000260600002606000026060000a5
91 | :1003a8002606000026060000260600002606000095
92 | :1003b8002606000026060000260600002606000085
93 | :1003c8002606000026060000260600002606000075
94 | :1003d8002606000026060000260600002606000065
95 | :1003e8002606000026060000260600002606000055
96 | :0803f8002606000026060000a5
97 | :020000040000fa
98 | :10052000303100003233000034350000363700002f
99 | :100530003839000016170000181900001a1b0000b7
100 | :100540001c1d00001e1f00001011000012130000ef
101 | :100550001415000005040000030200000100000063
102 | :1005600006070000080900000a0b00000c0d00003f
103 | :040570000e0f00006a
104 | :020000040000fa
105 | :100574000400fa000000eb00101688000000eb00f5
106 | :10058400401688000000eb00701688000000eb00a5
107 | :10059400a01688000000eb00d01688000000eb00d5
108 | :1005a400001788000000eb00301788000000eb0003
109 | :1005b400201688000000eb00501688000000eb00b5
110 | :1005c400801688000000eb00b01688000000eb00e5
111 | :1005d400e01688000000eb00101788000080eb0094
112 | :1005e400001688000080eb00301688000080eb00c5
113 | :1005f40060168800f0ff2700901688000080eb004a
114 | :10060400c016880070ff2f00f01688000000eb0071
115 | :10061400501988000000eb0060198800103a80002f
116 | :10062400000178000210a000610420007005200081
117 | :100634002374200081497800804978008249780039
118 | :1006440081e0a800417420009140780000ceb300fe
119 | :1006540000c0600044e7b700313a800000e02f009a
120 | :1006640000806000e001b300303a880044c7bf0056
121 | :10067400f043b20044e7b7000000eb00001188002b
122 | :1006840010002000401188001122200091407800c1
123 | :10069400c0cfb30000c060000014a00021e2b70086
124 | :1006a40021e2a8002342a800a10a2000914078007a
125 | :1006b40080cfb30000c060006040b300aae0b70080
126 | :1006c400910a200091407800f0c8b30000c0600097
127 | :1006d4000044a000a9e0b7009560a8000000eb006a
128 | :1006e400001988000000eb00101988000000eb00de
129 | :1006f400201988002183a8002143a800013220008a
130 | :100704009140780000ceb30000c0700020e3b70031
131 | :100714002043a8002132200091407800c0c3b300d8
132 | :1007240000c0700022e3b70030c0b30024e3b70078
133 | :10073400513220009140780000ceb30000c0600028
134 | :100744006040b30025e3b700813220009140780077
135 | :1007540000ceb30000c060006041b30028e3b700de
136 | :1007640021e3a8000000eb00001c880000302000fa
137 | :10077400401c8800f0002000501c8800d00020009d
138 | :10078400101c8800007e2000201c880081e3a80043
139 | :100794000000eb00200888000421a80010002000bd
140 | :1007a400100888000000eb00000888008460a9009d
141 | :1007b40005e1a8000228ef00d502ae000208a80057
142 | :1007c400d522ae000228a800d542ae000248a800f7
143 | :1007d400d562ae000268a800d402ae000288a80068
144 | :1007e40084c0bf00684060000004e000fcff3200e9
145 | :1007f4008460a90000ff83006101b80010ff83003a
146 | :1008040001002000020140008381480020ff830092
147 | :1008140001002000020140008381480030ff830072
148 | :1008240001002000020140008381480040ff830052
149 | :1008340001002000020140008381480050ff830032
150 | :1008440001002000020140008381480060ff830012
151 | :1008540001002000020140008381480070ff8300f2
152 | :1008640001002000020140008381480080ff8300d2
153 | :1008740001002000020140008381480090ff8300b2
154 | :10088400010020000201400083814800a0ff830092
155 | :10089400010020000201400083814800b0ff830072
156 | :1008a400010020000201400083814800c0ff830052
157 | :1008b400010020000201400083814800d0ff830032
158 | :1008c400010020000201400083814800e0ff830012
159 | :1008d400010020000201400083814800f0ff8300f2
160 | :1008e400010020000200400083804800304088005e
161 | :1008f4004140880030408000414080004c09dd00c8
162 | :100904004400de0000007100c408de00504088008e
163 | :1009140000c8bf008081fb005040800002712200ab
164 | :10092400110009000280d8008000fd00823e2000f2
165 | :10093400110009000280d8008000780000292800f6
166 | :10094400008040001040780080407800c080200083
167 | :1009540000804100014878000068ec0095c0bf00a9
168 | :10096400704060000004e00002003a008580a800a6
169 | :100974009580a80000c8bf008081fb005040800023
170 | :10098400823e2000110009000280d8008000fd0092
171 | :1009940042062000110009000280d800800078007f
172 | :1009a4000029280000804000104078008040780032
173 | :1009b400c080200000804100014878000068ec00fd
174 | :1009c40095c0bf00704060000004e00002003a00df
175 | :1009d4008580a8009580a80000c8bf008081fb0026
176 | :1009e4005040800042062000110009000280d80017
177 | :1009f4008000fd00a2002000110009000280d80040
178 | :100a04008000780000292800008040001040780011
179 | :100a140080407800c08020000080410001487800b8
180 | :100a24000068ec0095c0bf00704060000004e00066
181 | :100a340002003a008580a8009580a80000c8bf0085
182 | :100a44008081fb0050408000a200200011000900ba
183 | :100a54000280d8008000fd00800078000029280072
184 | :100a6400008040001040780080407800c080200062
185 | :100a740000804100014878000068ec0095c0bf0088
186 | :100a8400704060000004e00002003a008580a80085
187 | :100a94009580a80023408000130798001040800030
188 | :100aa4008040eb00014f78001e019000800f510040
189 | :100ab4000200390013c0b300034f78009e00900079
190 | :100ac4000100e800204088001e4178000204e00094
191 | :100ad4001000320000c8bf008080fb00c0802000ee
192 | :100ae40080804000d0c0b300804878000068ec00eb
193 | :100af40095c0bf00704060000004e00002003a00ae
194 | :100b04008580a8009580a8000000eb0020408800a4
195 | :100b14000d00370000c8bf008080fb00c0802000ab
196 | :100b240080804000c0c2b300804878000068ec00b8
197 | :100b340095c0bf00704060000004e00002003a006d
198 | :100b44008580a8009580a80021408000a029280065
199 | :100b540000804000104078007f4060007f416000ca
200 | :100b6400813220009140780000ceb30000c06000c4
201 | :100b74000240700028e3b7000eff3700809fbe00dc
202 | :100b84003400f80000002000a00188000000fa00f2
203 | :100b94008580a900118020009140780000c8bf0022
204 | :100ba40080cf50000900320001c8bf008080fb00e4
205 | :100bb400c080200000804000104078000080fb00ce
206 | :100bc400201188000168ec00010037009580a9001d
207 | :100bd4000080fa003400f9004f00be000040060017
208 | :100be4003400f800881f780008002000a80188005d
209 | :100bf4004f0478000000fa002682bf008560a90037
210 | :0c0c04000080fa003400f90000400600f7
211 | :020000040000fa
212 | :100c10000c080000000100000000000000080000b7
213 | :100c200006000000020000000000000000000000bc
214 | :100c3000e07f000020000000000000000608000027
215 | :0c0c4000060000000000000000000000a2
216 | :020000040000fa
217 | :040c4c000000fe00a6
218 | :00000001FF
219 |
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (ASCII at 16.384 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.IO;
10 |
11 | // Scope library from: http://www.oscilloscope-lib.com/
12 | // Oscilloscope C# wrapper from: Frank Greenlee
13 |
14 | namespace DAQ32_PC_Interface
15 | {
16 | public partial class Form1 : Form
17 | {
18 | private static Timer formUpdateTimer;
19 | private static DAQ32serial daq32;
20 | private static DAQ32data data;
21 | private static StreamWriter file;
22 | private static Oscilloscope scopeA, scopeB, scopeC, scopeD;
23 | private static int scopeA0, scopeA1, scopeA2, scopeAtrig,
24 | scopeB0, scopeB1, scopeB2, scopeBtrig,
25 | scopeC0, scopeC1, scopeC2, scopeCtrig,
26 | scopeD0, scopeD1, scopeD2, scopeDtrig;
27 | private static double time = 0;
28 |
29 | public Form1()
30 | {
31 | InitializeComponent();
32 | }
33 |
34 | #region Form load and close
35 |
36 | private void Form1_Load(object sender, EventArgs e)
37 | {
38 | // List aviable COM ports and select last in list
39 | string[] aviablePorts = System.IO.Ports.SerialPort.GetPortNames();
40 | for (int i = 0; i < aviablePorts.Length; i++) comboBox_COM.Items.Add(aviablePorts[i]);
41 | comboBox_COM.SelectedIndex = comboBox_COM.Items.Count - 1;
42 |
43 | // Create scope objects
44 | scopeA = Oscilloscope.CreateScope("scope_settings.ini", "");
45 | if (scopeA != null)
46 | {
47 | scopeB = Oscilloscope.CreateScope("scope_settings.ini", "");
48 | scopeC = Oscilloscope.CreateScope("scope_settings.ini", "");
49 | scopeD = Oscilloscope.CreateScope("scope_settings.ini", "");
50 | }
51 |
52 | // Set default scope channels
53 | comboBox_scopeA0.SelectedIndex = 0;
54 | comboBox_scopeA1.SelectedIndex = 1;
55 | comboBox_scopeA2.SelectedIndex = 2;
56 | comboBox_scopeAtrig.SelectedIndex = 12;
57 | comboBox_scopeB0.SelectedIndex = 3;
58 | comboBox_scopeB1.SelectedIndex = 4;
59 | comboBox_scopeB2.SelectedIndex = 5;
60 | comboBox_scopeBtrig.SelectedIndex = 13;
61 | comboBox_scopeC0.SelectedIndex = 6;
62 | comboBox_scopeC1.SelectedIndex = 7;
63 | comboBox_scopeC2.SelectedIndex = 8;
64 | comboBox_scopeCtrig.SelectedIndex = 14;
65 | comboBox_scopeD0.SelectedIndex = 9;
66 | comboBox_scopeD1.SelectedIndex = 10;
67 | comboBox_scopeD2.SelectedIndex = 11;
68 | comboBox_scopeDtrig.SelectedIndex = 15;
69 |
70 | // Show scopes (else disable scope form controls if .dll error)
71 | if (scopeA != null) scopeA.ShowScope();
72 | else
73 | {
74 | label_scopeA.Enabled = false;
75 | comboBox_scopeA0.Enabled = false;
76 | comboBox_scopeA1.Enabled = false;
77 | comboBox_scopeA2.Enabled = false;
78 | comboBox_scopeAtrig.Enabled = false;
79 | }
80 | if (scopeB != null) scopeB.ShowScope();
81 | else
82 | {
83 | label_scopeB.Enabled = false;
84 | comboBox_scopeB0.Enabled = false;
85 | comboBox_scopeB1.Enabled = false;
86 | comboBox_scopeB2.Enabled = false;
87 | comboBox_scopeBtrig.Enabled = false;
88 | }
89 | if (scopeC != null) scopeC.ShowScope();
90 | else
91 | {
92 | label_scopeC.Enabled = false;
93 | comboBox_scopeC0.Enabled = false;
94 | comboBox_scopeC1.Enabled = false;
95 | comboBox_scopeC2.Enabled = false;
96 | comboBox_scopeCtrig.Enabled = false;
97 | }
98 | if (scopeD != null) scopeD.ShowScope();
99 | else
100 | {
101 | label_scopeD.Enabled = false;
102 | comboBox_scopeD0.Enabled = false;
103 | comboBox_scopeD1.Enabled = false;
104 | comboBox_scopeD2.Enabled = false;
105 | comboBox_scopeDtrig.Enabled = false;
106 | }
107 |
108 | // Create new DAQ32 data object
109 | data = new DAQ32data();
110 |
111 | // Start for update timer
112 | formUpdateTimer = new Timer();
113 | formUpdateTimer.Interval = 50;
114 | formUpdateTimer.Tick += new EventHandler(formUpdateTimer_Tick);
115 | formUpdateTimer.Start();
116 | }
117 |
118 | private void Form1_FormClosed(object sender, FormClosedEventArgs e)
119 | {
120 | daq32.Close();
121 | try { file.Close(); }
122 | catch { }
123 | }
124 |
125 | #endregion
126 |
127 | #region Open/Close port, form update timer event and data received event
128 |
129 | private void button_openPort_Click(object sender, EventArgs e)
130 | {
131 | if (button_open.Text == "Open port")
132 | {
133 | try
134 | {
135 | daq32 = new DAQ32serial(comboBox_COM.Text);
136 | daq32.packetReceived += new DAQ32serial.onDataPacketReceived(daq32_packetReceived);
137 | daq32.packetError += new DAQ32serial.onDataPacketError(daq32_packetError);
138 | comboBox_COM.Enabled = false;
139 | button_open.Text = "Close port";
140 | }
141 | catch (Exception ex) { MessageBox.Show(ex.Message); }
142 | }
143 | else // if(button_connect.Text == "Disconnect")
144 | {
145 | daq32.Close();
146 | daq32 = null;
147 | comboBox_COM.Enabled = true;
148 | button_open.Text = "Open port";
149 | }
150 | }
151 |
152 | void formUpdateTimer_Tick(object sender, EventArgs e)
153 | {
154 | if (daq32 != null)
155 | {
156 | textBox_channels.Text = Convert.ToString(data.numChan);
157 | textBox_samplerate.Text = String.Format("{0:0.000}", data.sampleRate);
158 | textBox_samplePeriod.Text = String.Format("{0:0.000}", 1000.0 / data.sampleRate);
159 | textBox_packets.Text = Convert.ToString(data.packetCnt);
160 | textBox_errors.Text = Convert.ToString(data.errorCnt);
161 | }
162 | else
163 | {
164 | textBox_channels.Text = "";
165 | textBox_samplerate.Text = "";
166 | textBox_samplePeriod.Text = "";
167 | textBox_packets.Text = "";
168 | textBox_errors.Text = "";
169 | }
170 | }
171 |
172 | void daq32_packetReceived(object sender, DAQ32data e)
173 | {
174 | data = e;
175 | if (scopeA != null)
176 | {
177 | scopeA.AddScopeData(e.chan[scopeA0], e.chan[scopeA1], e.chan[scopeA2]);
178 | scopeA.AddExternalScopeData(e.chan[scopeAtrig]);
179 | scopeB.AddScopeData(e.chan[scopeB0], e.chan[scopeB1], e.chan[scopeB2]);
180 | scopeB.AddExternalScopeData(e.chan[scopeBtrig]);
181 | scopeC.AddScopeData(e.chan[scopeC0], e.chan[scopeC1], e.chan[scopeC2]);
182 | scopeC.AddExternalScopeData(e.chan[scopeCtrig]);
183 | scopeD.AddScopeData(e.chan[scopeD0], e.chan[scopeD1], e.chan[scopeD2]);
184 | scopeD.AddExternalScopeData(e.chan[scopeDtrig]);
185 | }
186 | if (file != null)
187 | {
188 | time += 1.0 / e.sampleRate;
189 | file.WriteLine(Convert.ToString(time) + "," + e.CSVline);
190 | }
191 | }
192 |
193 | #endregion
194 |
195 | #region Scope channel select
196 |
197 | private void comboBox_scopeA012trig_SelectedIndexChanged(object sender, EventArgs e)
198 | {
199 | if (scopeA != null)
200 | {
201 | scopeA0 = comboBox_scopeA0.SelectedIndex;
202 | scopeA1 = comboBox_scopeA1.SelectedIndex;
203 | scopeA2 = comboBox_scopeA2.SelectedIndex;
204 | scopeAtrig = comboBox_scopeAtrig.SelectedIndex;
205 | scopeA.Caption = "Scope A - Channels: " + Convert.ToString(scopeA0) + ", " + Convert.ToString(scopeA1) + ", " + Convert.ToString(scopeA2) + ", Ext.Trig: " + Convert.ToString(scopeAtrig);
206 | }
207 | }
208 |
209 | private void comboBox_scopeB012trig_SelectedIndexChanged(object sender, EventArgs e)
210 | {
211 | if (scopeB != null)
212 | {
213 | scopeB0 = comboBox_scopeB0.SelectedIndex;
214 | scopeB1 = comboBox_scopeB1.SelectedIndex;
215 | scopeB2 = comboBox_scopeB2.SelectedIndex;
216 | scopeBtrig = comboBox_scopeBtrig.SelectedIndex;
217 | scopeB.Caption = "Scope B - Channels: " + Convert.ToString(scopeB0) + ", " + Convert.ToString(scopeB1) + ", " + Convert.ToString(scopeB2) + ", Ext.Trig: " + Convert.ToString(scopeBtrig);
218 | }
219 | }
220 |
221 | private void comboBox_scopeC012trig_SelectedIndexChanged(object sender, EventArgs e)
222 | {
223 | if (scopeC != null)
224 | {
225 | scopeC0 = comboBox_scopeC0.SelectedIndex;
226 | scopeC1 = comboBox_scopeC1.SelectedIndex;
227 | scopeC2 = comboBox_scopeC2.SelectedIndex;
228 | scopeCtrig = comboBox_scopeCtrig.SelectedIndex;
229 | scopeC.Caption = "Scope C - Channels: " + Convert.ToString(scopeC0) + ", " + Convert.ToString(scopeC1) + ", " + Convert.ToString(scopeC2) + ", Ext.Trig: " + Convert.ToString(scopeCtrig);
230 | }
231 | }
232 |
233 | private void comboBox_scopeD012trig_SelectedIndexChanged(object sender, EventArgs e)
234 | {
235 | if (scopeD != null)
236 | {
237 | scopeD0 = comboBox_scopeD0.SelectedIndex;
238 | scopeD1 = comboBox_scopeD1.SelectedIndex;
239 | scopeD2 = comboBox_scopeD2.SelectedIndex;
240 | scopeDtrig = comboBox_scopeDtrig.SelectedIndex;
241 | scopeD.Caption = "Scope D - Channels: " + Convert.ToString(scopeD0) + ", " + Convert.ToString(scopeD1) + ", " + Convert.ToString(scopeD2) + ", Ext.Trig: " + Convert.ToString(scopeDtrig);
242 | }
243 | }
244 |
245 | #endregion
246 |
247 | #region Start/Stop log and packet error event
248 |
249 | private void button_startLog_Click(object sender, EventArgs e)
250 | {
251 | if (button_startLog.Text == "Start Log")
252 | {
253 | try
254 | {
255 | time = 0;
256 | file = new System.IO.StreamWriter(Directory.GetCurrentDirectory() + "\\" + textBox_filename.Text + ".csv", false);
257 | textBox_filename.Enabled = false;
258 | button_startLog.Text = "Stop Log";
259 | }
260 | catch (Exception ex) { MessageBox.Show(ex.Message); }
261 | }
262 | else // if(button_startLog.Text == "Stop Log")
263 | {
264 | closeFile();
265 | }
266 | }
267 |
268 | void daq32_packetError(object sender, EventArgs e)
269 | {
270 | if (file != null)
271 | {
272 | this.EndInvoke(this.BeginInvoke(new MethodInvoker(delegate { closeFile(); })));
273 | MessageBox.Show("Log stopped due to packet framing error");
274 | }
275 | }
276 |
277 | private void closeFile()
278 | {
279 | if (file != null) file.Close();
280 | file = null;
281 | textBox_filename.Enabled = true;
282 | button_startLog.Text = "Start Log";
283 | }
284 |
285 | #endregion
286 |
287 | }
288 | }
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz)/DAQ32_PC_Interface/DAQ32_PC_Interface/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.IO;
10 |
11 | // Osc_DLL.dll library from: http://www.oscilloscope-lib.com/
12 | // Oscilloscope.cs C# wrapper from: Frank Greenlee
13 |
14 | namespace DAQ32_PC_Interface
15 | {
16 | public partial class Form1 : Form
17 | {
18 | private static Timer formUpdateTimer;
19 | private static DAQ32serial daq32;
20 | private static DAQ32data data;
21 | private static StreamWriter file;
22 | private static Oscilloscope scopeA, scopeB, scopeC, scopeD;
23 | private static int scopeA0, scopeA1, scopeA2, scopeAtrig,
24 | scopeB0, scopeB1, scopeB2, scopeBtrig,
25 | scopeC0, scopeC1, scopeC2, scopeCtrig,
26 | scopeD0, scopeD1, scopeD2, scopeDtrig;
27 | private static double time = 0;
28 | private const string iniFileName = "scope_settings.ini";
29 |
30 | public Form1()
31 | {
32 | InitializeComponent();
33 | }
34 |
35 | #region Form load and close
36 |
37 | private void Form1_Load(object sender, EventArgs e)
38 | {
39 | // List aviable COM ports and select last in list
40 | string[] aviablePorts = System.IO.Ports.SerialPort.GetPortNames();
41 | for (int i = 0; i < aviablePorts.Length; i++) comboBox_COM.Items.Add(aviablePorts[i]);
42 | comboBox_COM.SelectedIndex = comboBox_COM.Items.Count - 1;
43 |
44 | // Create scope objects
45 | scopeA = Oscilloscope.CreateScope(iniFileName, "");
46 | if (scopeA != null)
47 | {
48 | scopeB = Oscilloscope.CreateScope(iniFileName, "");
49 | scopeC = Oscilloscope.CreateScope(iniFileName, "");
50 | scopeD = Oscilloscope.CreateScope(iniFileName, "");
51 | }
52 |
53 | // Set default scope channels
54 | comboBox_scopeA0.SelectedIndex = 0;
55 | comboBox_scopeA1.SelectedIndex = 1;
56 | comboBox_scopeA2.SelectedIndex = 2;
57 | comboBox_scopeAtrig.SelectedIndex = 12;
58 | comboBox_scopeB0.SelectedIndex = 3;
59 | comboBox_scopeB1.SelectedIndex = 4;
60 | comboBox_scopeB2.SelectedIndex = 5;
61 | comboBox_scopeBtrig.SelectedIndex = 13;
62 | comboBox_scopeC0.SelectedIndex = 6;
63 | comboBox_scopeC1.SelectedIndex = 7;
64 | comboBox_scopeC2.SelectedIndex = 8;
65 | comboBox_scopeCtrig.SelectedIndex = 14;
66 | comboBox_scopeD0.SelectedIndex = 9;
67 | comboBox_scopeD1.SelectedIndex = 10;
68 | comboBox_scopeD2.SelectedIndex = 11;
69 | comboBox_scopeDtrig.SelectedIndex = 15;
70 |
71 | // Show scopes and use default settings if .ini file file not present
72 | if (scopeA != null)
73 | {
74 | scopeA.ShowScope();
75 | scopeB.ShowScope();
76 | scopeC.ShowScope();
77 | scopeD.ShowScope();
78 | if (!File.Exists(iniFileName))
79 | {
80 | #region default scope settings
81 | scopeA.TriggerLevel1 = 2048;
82 | scopeA.TriggerLevel2 = 2048;
83 | scopeA.TriggerLevel3 = 2048;
84 | scopeA.AmplitudeScale1 = 300;
85 | scopeA.AmplitudeScale2 = 300;
86 | scopeA.AmplitudeScale3 = 300;
87 | scopeA.VerticalOffset1 = -2000;
88 | scopeA.VerticalOffset2 = -2000;
89 | scopeA.VerticalOffset3 = -2000;
90 | scopeA.SamplesPerGridCell = 100;
91 | scopeA.CellSize = 35;
92 | scopeA.Width = 630;
93 | scopeA.Height = 470;
94 | scopeB.TriggerLevel1 = 2048;
95 | scopeB.TriggerLevel2 = 2048;
96 | scopeB.TriggerLevel3 = 2048;
97 | scopeB.AmplitudeScale1 = 300;
98 | scopeB.AmplitudeScale2 = 300;
99 | scopeB.AmplitudeScale3 = 300;
100 | scopeB.VerticalOffset1 = -2000;
101 | scopeB.VerticalOffset2 = -2000;
102 | scopeB.VerticalOffset3 = -2000;
103 | scopeB.SamplesPerGridCell = 100;
104 | scopeB.CellSize = 35;
105 | scopeB.Width = 630;
106 | scopeB.Height = 470;
107 | scopeC.TriggerLevel1 = 2048;
108 | scopeC.TriggerLevel2 = 2048;
109 | scopeC.TriggerLevel3 = 2048;
110 | scopeC.AmplitudeScale1 = 300;
111 | scopeC.AmplitudeScale2 = 300;
112 | scopeC.AmplitudeScale3 = 300;
113 | scopeC.VerticalOffset1 = -2000;
114 | scopeC.VerticalOffset2 = -2000;
115 | scopeC.VerticalOffset3 = -2000;
116 | scopeC.SamplesPerGridCell = 100;
117 | scopeC.CellSize = 35;
118 | scopeC.Width = 630;
119 | scopeC.Height = 470;
120 | scopeD.TriggerLevel1 = 2048;
121 | scopeD.TriggerLevel2 = 2048;
122 | scopeD.TriggerLevel3 = 2048;
123 | scopeD.AmplitudeScale1 = 300;
124 | scopeD.AmplitudeScale2 = 300;
125 | scopeD.AmplitudeScale3 = 300;
126 | scopeD.VerticalOffset1 = -2000;
127 | scopeD.VerticalOffset2 = -2000;
128 | scopeD.VerticalOffset3 = -2000;
129 | scopeD.SamplesPerGridCell = 100;
130 | scopeD.CellSize = 35;
131 | scopeD.Width = 630;
132 | scopeD.Height = 470;
133 | #endregion
134 | }
135 | }
136 |
137 | // disable scope form controls if scope .dll error
138 | else
139 | {
140 | label_scopeA.Enabled = false;
141 | comboBox_scopeA0.Enabled = false;
142 | comboBox_scopeA1.Enabled = false;
143 | comboBox_scopeA2.Enabled = false;
144 | comboBox_scopeAtrig.Enabled = false;
145 | label_scopeB.Enabled = false;
146 | comboBox_scopeB0.Enabled = false;
147 | comboBox_scopeB1.Enabled = false;
148 | comboBox_scopeB2.Enabled = false;
149 | comboBox_scopeBtrig.Enabled = false;
150 | label_scopeC.Enabled = false;
151 | comboBox_scopeC0.Enabled = false;
152 | comboBox_scopeC1.Enabled = false;
153 | comboBox_scopeC2.Enabled = false;
154 | comboBox_scopeCtrig.Enabled = false;
155 | label_scopeD.Enabled = false;
156 | comboBox_scopeD0.Enabled = false;
157 | comboBox_scopeD1.Enabled = false;
158 | comboBox_scopeD2.Enabled = false;
159 | comboBox_scopeDtrig.Enabled = false;
160 | }
161 |
162 | // Create new DAQ32 data object
163 | data = new DAQ32data();
164 |
165 | // Start for update timer
166 | formUpdateTimer = new Timer();
167 | formUpdateTimer.Interval = 50;
168 | formUpdateTimer.Tick += new EventHandler(formUpdateTimer_Tick);
169 | formUpdateTimer.Start();
170 | }
171 |
172 | private void Form1_FormClosed(object sender, FormClosedEventArgs e)
173 | {
174 | scopeA.Dispose();
175 | scopeB.Dispose();
176 | scopeC.Dispose();
177 | scopeD.Dispose();
178 | daq32.Close();
179 | try { file.Close(); }
180 | catch { }
181 | }
182 |
183 | #endregion
184 |
185 | #region Open/Close port, form update timer event and data received event
186 |
187 | private void button_openPort_Click(object sender, EventArgs e)
188 | {
189 | if (button_open.Text == "Open port")
190 | {
191 | try
192 | {
193 | daq32 = new DAQ32serial(comboBox_COM.Text);
194 | daq32.packetReceived += new DAQ32serial.onDataPacketReceived(daq32_packetReceived);
195 | daq32.packetError += new DAQ32serial.onDataPacketError(daq32_packetError);
196 | comboBox_COM.Enabled = false;
197 | button_open.Text = "Close port";
198 | }
199 | catch (Exception ex) { MessageBox.Show(ex.Message); }
200 | }
201 | else // if(button_connect.Text == "Disconnect")
202 | {
203 | daq32.Close();
204 | daq32 = null;
205 | comboBox_COM.Enabled = true;
206 | button_open.Text = "Open port";
207 | }
208 | }
209 |
210 | void formUpdateTimer_Tick(object sender, EventArgs e)
211 | {
212 | if (daq32 != null)
213 | {
214 | textBox_channels.Text = Convert.ToString(data.numChan);
215 | textBox_samplerate.Text = String.Format("{0:0.000}", data.sampleRate / 1000);
216 | textBox_samplePeriod.Text = String.Format("{0:0.000}", 1000000.0 / data.sampleRate);
217 | textBox_packets.Text = Convert.ToString(data.packetCnt);
218 | textBox_errors.Text = Convert.ToString(data.errorCnt);
219 | }
220 | else
221 | {
222 | textBox_channels.Text = "";
223 | textBox_samplerate.Text = "";
224 | textBox_samplePeriod.Text = "";
225 | textBox_packets.Text = "";
226 | textBox_errors.Text = "";
227 | }
228 | }
229 |
230 | void daq32_packetReceived(object sender, DAQ32data e)
231 | {
232 | data = e;
233 | if (scopeA != null)
234 | {
235 | scopeA.AddScopeData(e.chan[scopeA0], e.chan[scopeA1], e.chan[scopeA2]);
236 | scopeA.AddExternalScopeData(e.chan[scopeAtrig]);
237 | scopeB.AddScopeData(e.chan[scopeB0], e.chan[scopeB1], e.chan[scopeB2]);
238 | scopeB.AddExternalScopeData(e.chan[scopeBtrig]);
239 | scopeC.AddScopeData(e.chan[scopeC0], e.chan[scopeC1], e.chan[scopeC2]);
240 | scopeC.AddExternalScopeData(e.chan[scopeCtrig]);
241 | scopeD.AddScopeData(e.chan[scopeD0], e.chan[scopeD1], e.chan[scopeD2]);
242 | scopeD.AddExternalScopeData(e.chan[scopeDtrig]);
243 | }
244 | if (file != null)
245 | {
246 | time += 1.0 / e.sampleRate;
247 | file.WriteLine(Convert.ToString(time) + "," + e.CSVline);
248 | }
249 | }
250 |
251 | #endregion
252 |
253 | #region Scope channel select
254 |
255 | private void comboBox_scopeA012trig_SelectedIndexChanged(object sender, EventArgs e)
256 | {
257 | if (scopeA != null)
258 | {
259 | scopeA0 = comboBox_scopeA0.SelectedIndex;
260 | scopeA1 = comboBox_scopeA1.SelectedIndex;
261 | scopeA2 = comboBox_scopeA2.SelectedIndex;
262 | scopeAtrig = comboBox_scopeAtrig.SelectedIndex;
263 | scopeA.Caption = "Scope A - Channels: " + Convert.ToString(scopeA0) + ", " + Convert.ToString(scopeA1) + ", " + Convert.ToString(scopeA2) + ", Ext.Trig: " + Convert.ToString(scopeAtrig);
264 | }
265 | }
266 |
267 | private void comboBox_scopeB012trig_SelectedIndexChanged(object sender, EventArgs e)
268 | {
269 | if (scopeB != null)
270 | {
271 | scopeB0 = comboBox_scopeB0.SelectedIndex;
272 | scopeB1 = comboBox_scopeB1.SelectedIndex;
273 | scopeB2 = comboBox_scopeB2.SelectedIndex;
274 | scopeBtrig = comboBox_scopeBtrig.SelectedIndex;
275 | scopeB.Caption = "Scope B - Channels: " + Convert.ToString(scopeB0) + ", " + Convert.ToString(scopeB1) + ", " + Convert.ToString(scopeB2) + ", Ext.Trig: " + Convert.ToString(scopeBtrig);
276 | }
277 | }
278 |
279 | private void comboBox_scopeC012trig_SelectedIndexChanged(object sender, EventArgs e)
280 | {
281 | if (scopeC != null)
282 | {
283 | scopeC0 = comboBox_scopeC0.SelectedIndex;
284 | scopeC1 = comboBox_scopeC1.SelectedIndex;
285 | scopeC2 = comboBox_scopeC2.SelectedIndex;
286 | scopeCtrig = comboBox_scopeCtrig.SelectedIndex;
287 | scopeC.Caption = "Scope C - Channels: " + Convert.ToString(scopeC0) + ", " + Convert.ToString(scopeC1) + ", " + Convert.ToString(scopeC2) + ", Ext.Trig: " + Convert.ToString(scopeCtrig);
288 | }
289 | }
290 |
291 | private void comboBox_scopeD012trig_SelectedIndexChanged(object sender, EventArgs e)
292 | {
293 | if (scopeD != null)
294 | {
295 | scopeD0 = comboBox_scopeD0.SelectedIndex;
296 | scopeD1 = comboBox_scopeD1.SelectedIndex;
297 | scopeD2 = comboBox_scopeD2.SelectedIndex;
298 | scopeDtrig = comboBox_scopeDtrig.SelectedIndex;
299 | scopeD.Caption = "Scope D - Channels: " + Convert.ToString(scopeD0) + ", " + Convert.ToString(scopeD1) + ", " + Convert.ToString(scopeD2) + ", Ext.Trig: " + Convert.ToString(scopeDtrig);
300 | }
301 | }
302 |
303 | #endregion
304 |
305 | #region Start/Stop log and packet error event
306 |
307 | private void button_startLog_Click(object sender, EventArgs e)
308 | {
309 | if (button_startLog.Text == "Start Log")
310 | {
311 | try
312 | {
313 | time = 0;
314 | file = new System.IO.StreamWriter(Directory.GetCurrentDirectory() + "\\" + textBox_filename.Text + ".csv", false);
315 | textBox_filename.Enabled = false;
316 | button_startLog.Text = "Stop Log";
317 | }
318 | catch (Exception ex) { MessageBox.Show(ex.Message); }
319 | }
320 | else // if(button_startLog.Text == "Stop Log")
321 | {
322 | closeFile();
323 | }
324 | }
325 |
326 | void daq32_packetError(object sender, EventArgs e)
327 | {
328 | if (file != null)
329 | {
330 | this.EndInvoke(this.BeginInvoke(new MethodInvoker(delegate { closeFile(); })));
331 | MessageBox.Show("Log stopped due to packet framing error");
332 | }
333 | }
334 |
335 | private void closeFile()
336 | {
337 | if (file != null) file.Close();
338 | file = null;
339 | textBox_filename.Enabled = true;
340 | button_startLog.Text = "Start Log";
341 | }
342 |
343 | #endregion
344 |
345 | }
346 | }
--------------------------------------------------------------------------------
/DAQ32 Software/DAQ32_PC_Interface (binary at 32.768 kHz with 11 scopes)/DAQ32_PC_Interface/DAQ32_PC_Interface/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.IO;
10 |
11 | namespace DAQ32_PC_Interface
12 | {
13 | public partial class Form1 : Form
14 | {
15 | private static Timer formUpdateTimer;
16 | private static DAQ32serial daq32;
17 | private static DAQ32data data;
18 | private static StreamWriter file;
19 | private static Oscilloscope scopeA, scopeB, scopeC, scopeD, scopeE, scopeF, scopeG, scopeH, scopeI, scopeJ, scopeK;
20 | private static int scopeA0, scopeA1, scopeA2, scopeAtrig, scopeB0, scopeB1, scopeB2, scopeBtrig,
21 | scopeC0, scopeC1, scopeC2, scopeCtrig, scopeD0, scopeD1, scopeD2, scopeDtrig,
22 | scopeE0, scopeE1, scopeE2, scopeEtrig, scopeF0, scopeF1, scopeF2, scopeFtrig,
23 | scopeG0, scopeG1, scopeG2, scopeGtrig, scopeH0, scopeH1, scopeH2, scopeHtrig,
24 | scopeI0, scopeI1, scopeI2, scopeItrig, scopeJ0, scopeJ1, scopeJ2, scopeJtrig,
25 | scopeK0, scopeK1, scopeK2, scopeKtrig;
26 | private static double time = 0;
27 |
28 | public Form1()
29 | {
30 | InitializeComponent();
31 | }
32 |
33 | #region Form load and close
34 |
35 | private void Form1_Load(object sender, EventArgs e)
36 | {
37 | // List aviable COM ports and select last in list
38 | string[] aviablePorts = System.IO.Ports.SerialPort.GetPortNames();
39 | for (int i = 0; i < aviablePorts.Length; i++) comboBox_COM.Items.Add(aviablePorts[i]);
40 | comboBox_COM.SelectedIndex = comboBox_COM.Items.Count - 1;
41 |
42 | // Create scope objects
43 | scopeA = Oscilloscope.CreateScope("scope_settings.ini", "");
44 | if (scopeA != null)
45 | {
46 | scopeB = Oscilloscope.CreateScope("scope_settings.ini", "");
47 | scopeC = Oscilloscope.CreateScope("scope_settings.ini", "");
48 | scopeD = Oscilloscope.CreateScope("scope_settings.ini", "");
49 | scopeE = Oscilloscope.CreateScope("scope_settings.ini", "");
50 | scopeF = Oscilloscope.CreateScope("scope_settings.ini", "");
51 | scopeG = Oscilloscope.CreateScope("scope_settings.ini", "");
52 | scopeH = Oscilloscope.CreateScope("scope_settings.ini", "");
53 | scopeI = Oscilloscope.CreateScope("scope_settings.ini", "");
54 | scopeJ = Oscilloscope.CreateScope("scope_settings.ini", "");
55 | scopeK = Oscilloscope.CreateScope("scope_settings.ini", "");
56 | }
57 |
58 | // Set default scope channels
59 | comboBox_scopeA0.SelectedIndex = 0;
60 | comboBox_scopeA1.SelectedIndex = 1;
61 | comboBox_scopeA2.SelectedIndex = 2;
62 | comboBox_scopeAtrig.SelectedIndex = 0;
63 | comboBox_scopeB0.SelectedIndex = 3;
64 | comboBox_scopeB1.SelectedIndex = 4;
65 | comboBox_scopeB2.SelectedIndex = 5;
66 | comboBox_scopeBtrig.SelectedIndex = 3;
67 | comboBox_scopeC0.SelectedIndex = 6;
68 | comboBox_scopeC1.SelectedIndex = 7;
69 | comboBox_scopeC2.SelectedIndex = 8;
70 | comboBox_scopeCtrig.SelectedIndex = 6;
71 | comboBox_scopeD0.SelectedIndex = 9;
72 | comboBox_scopeD1.SelectedIndex = 10;
73 | comboBox_scopeD2.SelectedIndex = 11;
74 | comboBox_scopeDtrig.SelectedIndex = 9;
75 | comboBox_scopeE0.SelectedIndex = 12;
76 | comboBox_scopeE1.SelectedIndex = 13;
77 | comboBox_scopeE2.SelectedIndex = 14;
78 | comboBox_scopeEtrig.SelectedIndex = 12;
79 | comboBox_scopeF0.SelectedIndex = 15;
80 | comboBox_scopeF1.SelectedIndex = 16;
81 | comboBox_scopeF2.SelectedIndex = 17;
82 | comboBox_scopeFtrig.SelectedIndex = 15;
83 | comboBox_scopeG0.SelectedIndex = 18;
84 | comboBox_scopeG1.SelectedIndex = 19;
85 | comboBox_scopeG2.SelectedIndex = 20;
86 | comboBox_scopeGtrig.SelectedIndex = 18;
87 | comboBox_scopeH0.SelectedIndex = 21;
88 | comboBox_scopeH1.SelectedIndex = 22;
89 | comboBox_scopeH2.SelectedIndex = 23;
90 | comboBox_scopeHtrig.SelectedIndex = 21;
91 | comboBox_scopeI0.SelectedIndex = 24;
92 | comboBox_scopeI1.SelectedIndex = 25;
93 | comboBox_scopeI2.SelectedIndex = 26;
94 | comboBox_scopeItrig.SelectedIndex = 24;
95 | comboBox_scopeJ0.SelectedIndex = 27;
96 | comboBox_scopeJ1.SelectedIndex = 28;
97 | comboBox_scopeJ2.SelectedIndex = 29;
98 | comboBox_scopeJtrig.SelectedIndex = 28;
99 | comboBox_scopeK0.SelectedIndex = 30;
100 | comboBox_scopeK1.SelectedIndex = 31;
101 | comboBox_scopeK2.SelectedIndex = 0;
102 | comboBox_scopeKtrig.SelectedIndex = 30;
103 |
104 | // Show scopes else disable controls if .ini file file not present
105 | if (scopeA != null)
106 | {
107 | //button_scopeAshow.PerformClick();
108 | //button_scopeBshow.PerformClick();
109 | //button_scopeCshow.PerformClick();
110 | //button_scopeDshow.PerformClick();
111 | //button_scopeEshow.PerformClick();
112 | //button_scopeFshow.PerformClick();
113 | //button_scopeGshow.PerformClick();
114 | //button_scopeHshow.PerformClick();
115 | //button_scopeIshow.PerformClick();
116 | //button_scopeJshow.PerformClick();
117 | //button_scopeKshow.PerformClick();
118 | }
119 | else
120 | {
121 | button_scopeAshow.Enabled = false;
122 | button_scopeBshow.Enabled = false;
123 | button_scopeCshow.Enabled = false;
124 | button_scopeDshow.Enabled = false;
125 | button_scopeEshow.Enabled = false;
126 | button_scopeFshow.Enabled = false;
127 | button_scopeGshow.Enabled = false;
128 | button_scopeHshow.Enabled = false;
129 | button_scopeIshow.Enabled = false;
130 | button_scopeJshow.Enabled = false;
131 | button_scopeKshow.Enabled = false;
132 | }
133 |
134 | // Create new DAQ32 data object
135 | data = new DAQ32data();
136 |
137 | // Start for update timer
138 | formUpdateTimer = new Timer();
139 | formUpdateTimer.Interval = 50;
140 | formUpdateTimer.Tick += new EventHandler(formUpdateTimer_Tick);
141 | formUpdateTimer.Start();
142 | }
143 |
144 | private void Form1_FormClosed(object sender, FormClosedEventArgs e)
145 | {
146 | daq32.Close();
147 | if (file != null) file.Close();
148 | scopeA.Dispose();
149 | scopeB.Dispose();
150 | scopeC.Dispose();
151 | scopeD.Dispose();
152 | scopeE.Dispose();
153 | scopeF.Dispose();
154 | scopeG.Dispose();
155 | scopeH.Dispose();
156 | scopeI.Dispose();
157 | scopeJ.Dispose();
158 | scopeK.Dispose();
159 | }
160 |
161 | #endregion
162 |
163 | #region Open/Close port, form update timer event and data received event
164 |
165 | private void button_openPort_Click(object sender, EventArgs e)
166 | {
167 | if (button_open.Text == "Open port")
168 | {
169 | try
170 | {
171 | daq32 = new DAQ32serial(comboBox_COM.Text);
172 | daq32.packetReceived += new DAQ32serial.onDataPacketReceived(daq32_packetReceived);
173 | daq32.packetError += new DAQ32serial.onDataPacketError(daq32_packetError);
174 | comboBox_COM.Enabled = false;
175 | button_open.Text = "Close port";
176 | }
177 | catch (Exception ex) { MessageBox.Show(ex.Message); }
178 | }
179 | else
180 | {
181 | daq32.Close();
182 | daq32 = null;
183 | comboBox_COM.Enabled = true;
184 | button_open.Text = "Open port";
185 | }
186 | }
187 |
188 | void formUpdateTimer_Tick(object sender, EventArgs e)
189 | {
190 | if (daq32 != null)
191 | {
192 | textBox_channels.Text = Convert.ToString(data.numChan);
193 | textBox_samplerate.Text = String.Format("{0:0.000}", data.sampleRate / 1000);
194 | textBox_samplePeriod.Text = String.Format("{0:0.000}", 1000000.0 / data.sampleRate);
195 | textBox_packets.Text = Convert.ToString(data.packetCnt);
196 | }
197 | else
198 | {
199 | textBox_channels.Text = "";
200 | textBox_samplerate.Text = "";
201 | textBox_samplePeriod.Text = "";
202 | textBox_packets.Text = "";
203 | }
204 | }
205 |
206 | void daq32_packetReceived(object sender, DAQ32data e)
207 | {
208 | data = e;
209 | if (scopeA != null)
210 | {
211 | scopeA.AddScopeData(e.chan[scopeA0], e.chan[scopeA1], e.chan[scopeA2]);
212 | scopeA.AddExternalScopeData(e.chan[scopeAtrig]);
213 | scopeB.AddScopeData(e.chan[scopeB0], e.chan[scopeB1], e.chan[scopeB2]);
214 | scopeB.AddExternalScopeData(e.chan[scopeBtrig]);
215 | scopeC.AddScopeData(e.chan[scopeC0], e.chan[scopeC1], e.chan[scopeC2]);
216 | scopeC.AddExternalScopeData(e.chan[scopeCtrig]);
217 | scopeD.AddScopeData(e.chan[scopeD0], e.chan[scopeD1], e.chan[scopeD2]);
218 | scopeD.AddExternalScopeData(e.chan[scopeDtrig]);
219 | scopeE.AddScopeData(e.chan[scopeE0], e.chan[scopeE1], e.chan[scopeE2]);
220 | scopeE.AddExternalScopeData(e.chan[scopeEtrig]);
221 | scopeF.AddScopeData(e.chan[scopeF0], e.chan[scopeF1], e.chan[scopeF2]);
222 | scopeF.AddExternalScopeData(e.chan[scopeFtrig]);
223 | scopeG.AddScopeData(e.chan[scopeG0], e.chan[scopeG1], e.chan[scopeG2]);
224 | scopeG.AddExternalScopeData(e.chan[scopeGtrig]);
225 | scopeH.AddScopeData(e.chan[scopeH0], e.chan[scopeH1], e.chan[scopeH2]);
226 | scopeH.AddExternalScopeData(e.chan[scopeHtrig]);
227 | scopeI.AddScopeData(e.chan[scopeI0], e.chan[scopeI1], e.chan[scopeI2]);
228 | scopeI.AddExternalScopeData(e.chan[scopeItrig]);
229 | scopeJ.AddScopeData(e.chan[scopeJ0], e.chan[scopeJ1], e.chan[scopeJ2]);
230 | scopeJ.AddExternalScopeData(e.chan[scopeJtrig]);
231 | scopeK.AddScopeData(e.chan[scopeK0], e.chan[scopeK1], e.chan[scopeK2]);
232 | scopeK.AddExternalScopeData(e.chan[scopeKtrig]);
233 | }
234 | if (file != null)
235 | {
236 | time += 1.0 / e.sampleRate;
237 | file.WriteLine(Convert.ToString(time) + "," + e.CSVline);
238 | }
239 | }
240 |
241 | #endregion
242 |
243 | #region Scope channel select
244 |
245 | private void comboBox_scopeA012trig_SelectedIndexChanged(object sender, EventArgs e)
246 | {
247 | if (scopeA != null)
248 | {
249 | scopeA0 = comboBox_scopeA0.SelectedIndex;
250 | scopeA1 = comboBox_scopeA1.SelectedIndex;
251 | scopeA2 = comboBox_scopeA2.SelectedIndex;
252 | scopeAtrig = comboBox_scopeAtrig.SelectedIndex;
253 | scopeA.Caption = "Scope A - Channels: " + Convert.ToString(scopeA0) + ", " + Convert.ToString(scopeA1) + ", " + Convert.ToString(scopeA2) + ", Ext.Trig: " + Convert.ToString(scopeAtrig);
254 | }
255 | }
256 |
257 | private void comboBox_scopeB012trig_SelectedIndexChanged(object sender, EventArgs e)
258 | {
259 | if (scopeB != null)
260 | {
261 | scopeB0 = comboBox_scopeB0.SelectedIndex;
262 | scopeB1 = comboBox_scopeB1.SelectedIndex;
263 | scopeB2 = comboBox_scopeB2.SelectedIndex;
264 | scopeBtrig = comboBox_scopeBtrig.SelectedIndex;
265 | scopeB.Caption = "Scope B - Channels: " + Convert.ToString(scopeB0) + ", " + Convert.ToString(scopeB1) + ", " + Convert.ToString(scopeB2) + ", Ext.Trig: " + Convert.ToString(scopeBtrig);
266 | }
267 | }
268 |
269 | private void comboBox_scopeC012trig_SelectedIndexChanged(object sender, EventArgs e)
270 | {
271 | if (scopeC != null)
272 | {
273 | scopeC0 = comboBox_scopeC0.SelectedIndex;
274 | scopeC1 = comboBox_scopeC1.SelectedIndex;
275 | scopeC2 = comboBox_scopeC2.SelectedIndex;
276 | scopeCtrig = comboBox_scopeCtrig.SelectedIndex;
277 | scopeC.Caption = "Scope C - Channels: " + Convert.ToString(scopeC0) + ", " + Convert.ToString(scopeC1) + ", " + Convert.ToString(scopeC2) + ", Ext.Trig: " + Convert.ToString(scopeCtrig);
278 | }
279 | }
280 |
281 | private void comboBox_scopeD012trig_SelectedIndexChanged(object sender, EventArgs e)
282 | {
283 | if (scopeD != null)
284 | {
285 | scopeD0 = comboBox_scopeD0.SelectedIndex;
286 | scopeD1 = comboBox_scopeD1.SelectedIndex;
287 | scopeD2 = comboBox_scopeD2.SelectedIndex;
288 | scopeDtrig = comboBox_scopeDtrig.SelectedIndex;
289 | scopeD.Caption = "Scope D - Channels: " + Convert.ToString(scopeD0) + ", " + Convert.ToString(scopeD1) + ", " + Convert.ToString(scopeD2) + ", Ext.Trig: " + Convert.ToString(scopeDtrig);
290 | }
291 | }
292 |
293 | private void comboBox_scopeE012trig_SelectedIndexChanged(object sender, EventArgs e)
294 | {
295 | if (scopeE != null)
296 | {
297 | scopeE0 = comboBox_scopeE0.SelectedIndex;
298 | scopeE1 = comboBox_scopeE1.SelectedIndex;
299 | scopeE2 = comboBox_scopeE2.SelectedIndex;
300 | scopeEtrig = comboBox_scopeEtrig.SelectedIndex;
301 | scopeE.Caption = "Scope E - Channels: " + Convert.ToString(scopeE0) + ", " + Convert.ToString(scopeE1) + ", " + Convert.ToString(scopeE2) + ", Ext.Trig: " + Convert.ToString(scopeEtrig);
302 | }
303 | }
304 |
305 | private void comboBox_scopeF012trig_SelectedIndexChanged(object sender, EventArgs e)
306 | {
307 | if (scopeF != null)
308 | {
309 | scopeF0 = comboBox_scopeF0.SelectedIndex;
310 | scopeF1 = comboBox_scopeF1.SelectedIndex;
311 | scopeF2 = comboBox_scopeF2.SelectedIndex;
312 | scopeFtrig = comboBox_scopeFtrig.SelectedIndex;
313 | scopeF.Caption = "Scope F - Channels: " + Convert.ToString(scopeF0) + ", " + Convert.ToString(scopeF1) + ", " + Convert.ToString(scopeF2) + ", Ext.Trig: " + Convert.ToString(scopeFtrig);
314 | }
315 | }
316 |
317 | private void comboBox_scopeG012trig_SelectedIndexChanged(object sender, EventArgs e)
318 | {
319 | if (scopeG != null)
320 | {
321 | scopeG0 = comboBox_scopeG0.SelectedIndex;
322 | scopeG1 = comboBox_scopeG1.SelectedIndex;
323 | scopeG2 = comboBox_scopeG2.SelectedIndex;
324 | scopeGtrig = comboBox_scopeGtrig.SelectedIndex;
325 | scopeG.Caption = "Scope G - Channels: " + Convert.ToString(scopeG0) + ", " + Convert.ToString(scopeG1) + ", " + Convert.ToString(scopeG2) + ", Ext.Trig: " + Convert.ToString(scopeGtrig);
326 | }
327 | }
328 |
329 | private void comboBox_scopeH012trig_SelectedIndexChanged(object sender, EventArgs e)
330 | {
331 | if (scopeH != null)
332 | {
333 | scopeH0 = comboBox_scopeH0.SelectedIndex;
334 | scopeH1 = comboBox_scopeH1.SelectedIndex;
335 | scopeH2 = comboBox_scopeH2.SelectedIndex;
336 | scopeHtrig = comboBox_scopeHtrig.SelectedIndex;
337 | scopeH.Caption = "Scope H - Channels: " + Convert.ToString(scopeH0) + ", " + Convert.ToString(scopeH1) + ", " + Convert.ToString(scopeH2) + ", Ext.Trig: " + Convert.ToString(scopeHtrig);
338 | }
339 | }
340 |
341 | private void comboBox_scopeI012trig_SelectedIndexChanged(object sender, EventArgs e)
342 | {
343 | if (scopeI != null)
344 | {
345 | scopeI0 = comboBox_scopeI0.SelectedIndex;
346 | scopeI1 = comboBox_scopeI1.SelectedIndex;
347 | scopeI2 = comboBox_scopeI2.SelectedIndex;
348 | scopeItrig = comboBox_scopeItrig.SelectedIndex;
349 | scopeI.Caption = "Scope I - Channels: " + Convert.ToString(scopeI0) + ", " + Convert.ToString(scopeI1) + ", " + Convert.ToString(scopeI2) + ", Ext.Trig: " + Convert.ToString(scopeItrig);
350 | }
351 | }
352 |
353 | private void comboBox_scopeJ012trig_SelectedIndexChanged(object sender, EventArgs e)
354 | {
355 | if (scopeJ != null)
356 | {
357 | scopeJ0 = comboBox_scopeJ0.SelectedIndex;
358 | scopeJ1 = comboBox_scopeJ1.SelectedIndex;
359 | scopeJ2 = comboBox_scopeJ2.SelectedIndex;
360 | scopeJtrig = comboBox_scopeJtrig.SelectedIndex;
361 | scopeJ.Caption = "Scope J - Channels: " + Convert.ToString(scopeJ0) + ", " + Convert.ToString(scopeJ1) + ", " + Convert.ToString(scopeJ2) + ", Ext.Trig: " + Convert.ToString(scopeJtrig);
362 | }
363 | }
364 |
365 | private void comboBox_scopeK012trig_SelectedIndexChanged(object sender, EventArgs e)
366 | {
367 | if (scopeK != null)
368 | {
369 | scopeK0 = comboBox_scopeK0.SelectedIndex;
370 | scopeK1 = comboBox_scopeK1.SelectedIndex;
371 | scopeK2 = comboBox_scopeK2.SelectedIndex;
372 | scopeKtrig = comboBox_scopeKtrig.SelectedIndex;
373 | scopeK.Caption = "Scope K - Channels: " + Convert.ToString(scopeK0) + ", " + Convert.ToString(scopeK1) + ", " + Convert.ToString(scopeK2) + ", Ext.Trig: " + Convert.ToString(scopeKtrig);
374 | }
375 | }
376 |
377 | #endregion
378 |
379 | #region Scope Show/Hide
380 |
381 | private void button_scopeAshow_Click(object sender, EventArgs e)
382 | {
383 | if (button_scopeAshow.Text == "Show")
384 | {
385 | scopeA.ShowScope();
386 | button_scopeAshow.Text = "Hide";
387 | label_scopeA.Enabled = true;
388 | comboBox_scopeA0.Enabled = true;
389 | comboBox_scopeA1.Enabled = true;
390 | comboBox_scopeA2.Enabled = true;
391 | comboBox_scopeAtrig.Enabled = true;
392 | }
393 | else
394 | {
395 | scopeA.HideScope();
396 | button_scopeAshow.Text = "Show";
397 | label_scopeA.Enabled = false;
398 | comboBox_scopeA0.Enabled = false;
399 | comboBox_scopeA1.Enabled = false;
400 | comboBox_scopeA2.Enabled = false;
401 | comboBox_scopeAtrig.Enabled = false;
402 | }
403 | }
404 |
405 | private void button_scopeBshow_Click(object sender, EventArgs e)
406 | {
407 | if (button_scopeBshow.Text == "Show")
408 | {
409 | scopeB.ShowScope();
410 | button_scopeBshow.Text = "Hide";
411 | label_scopeB.Enabled = true;
412 | comboBox_scopeB0.Enabled = true;
413 | comboBox_scopeB1.Enabled = true;
414 | comboBox_scopeB2.Enabled = true;
415 | comboBox_scopeBtrig.Enabled = true;
416 | }
417 | else
418 | {
419 | scopeB.HideScope();
420 | button_scopeBshow.Text = "Show";
421 | label_scopeB.Enabled = false;
422 | comboBox_scopeB0.Enabled = false;
423 | comboBox_scopeB1.Enabled = false;
424 | comboBox_scopeB2.Enabled = false;
425 | comboBox_scopeBtrig.Enabled = false;
426 | }
427 | }
428 |
429 | private void button_scopeCshow_Click(object sender, EventArgs e)
430 | {
431 | if (button_scopeCshow.Text == "Show")
432 | {
433 | scopeC.ShowScope();
434 | button_scopeCshow.Text = "Hide";
435 | label_scopeC.Enabled = true;
436 | comboBox_scopeC0.Enabled = true;
437 | comboBox_scopeC1.Enabled = true;
438 | comboBox_scopeC2.Enabled = true;
439 | comboBox_scopeCtrig.Enabled = true;
440 | }
441 | else
442 | {
443 | scopeC.HideScope();
444 | button_scopeCshow.Text = "Show";
445 | label_scopeC.Enabled = false;
446 | comboBox_scopeC0.Enabled = false;
447 | comboBox_scopeC1.Enabled = false;
448 | comboBox_scopeC2.Enabled = false;
449 | comboBox_scopeCtrig.Enabled = false;
450 | }
451 | }
452 |
453 | private void button_scopeDshow_Click(object sender, EventArgs e)
454 | {
455 | if (button_scopeDshow.Text == "Show")
456 | {
457 | scopeD.ShowScope();
458 | button_scopeDshow.Text = "Hide";
459 | label_scopeD.Enabled = true;
460 | comboBox_scopeD0.Enabled = true;
461 | comboBox_scopeD1.Enabled = true;
462 | comboBox_scopeD2.Enabled = true;
463 | comboBox_scopeDtrig.Enabled = true;
464 | }
465 | else
466 | {
467 | scopeD.HideScope();
468 | button_scopeDshow.Text = "Show";
469 | label_scopeD.Enabled = false;
470 | comboBox_scopeD0.Enabled = false;
471 | comboBox_scopeD1.Enabled = false;
472 | comboBox_scopeD2.Enabled = false;
473 | comboBox_scopeDtrig.Enabled = false;
474 | }
475 | }
476 |
477 | private void button_scopeEshow_Click(object sender, EventArgs e)
478 | {
479 | if (button_scopeEshow.Text == "Show")
480 | {
481 | scopeE.ShowScope();
482 | button_scopeEshow.Text = "Hide";
483 | label_scopeE.Enabled = true;
484 | comboBox_scopeE0.Enabled = true;
485 | comboBox_scopeE1.Enabled = true;
486 | comboBox_scopeE2.Enabled = true;
487 | comboBox_scopeEtrig.Enabled = true;
488 | }
489 | else
490 | {
491 | scopeE.HideScope();
492 | button_scopeEshow.Text = "Show";
493 | label_scopeE.Enabled = false;
494 | comboBox_scopeE0.Enabled = false;
495 | comboBox_scopeE1.Enabled = false;
496 | comboBox_scopeE2.Enabled = false;
497 | comboBox_scopeEtrig.Enabled = false;
498 | }
499 | }
500 |
501 | private void button_scopeFshow_Click(object sender, EventArgs e)
502 | {
503 | if (button_scopeFshow.Text == "Show")
504 | {
505 | scopeF.ShowScope();
506 | button_scopeFshow.Text = "Hide";
507 | label_scopeF.Enabled = true;
508 | comboBox_scopeF0.Enabled = true;
509 | comboBox_scopeF1.Enabled = true;
510 | comboBox_scopeF2.Enabled = true;
511 | comboBox_scopeFtrig.Enabled = true;
512 | }
513 | else
514 | {
515 | scopeF.HideScope();
516 | button_scopeFshow.Text = "Show";
517 | label_scopeF.Enabled = false;
518 | comboBox_scopeF0.Enabled = false;
519 | comboBox_scopeF1.Enabled = false;
520 | comboBox_scopeF2.Enabled = false;
521 | comboBox_scopeFtrig.Enabled = false;
522 | }
523 | }
524 |
525 | private void button_scopeGshow_Click(object sender, EventArgs e)
526 | {
527 | if (button_scopeGshow.Text == "Show")
528 | {
529 | scopeG.ShowScope();
530 | button_scopeGshow.Text = "Hide";
531 | label_scopeG.Enabled = true;
532 | comboBox_scopeG0.Enabled = true;
533 | comboBox_scopeG1.Enabled = true;
534 | comboBox_scopeG2.Enabled = true;
535 | comboBox_scopeGtrig.Enabled = true;
536 | }
537 | else
538 | {
539 | scopeG.HideScope();
540 | button_scopeGshow.Text = "Show";
541 | label_scopeG.Enabled = false;
542 | comboBox_scopeG0.Enabled = false;
543 | comboBox_scopeG1.Enabled = false;
544 | comboBox_scopeG2.Enabled = false;
545 | comboBox_scopeGtrig.Enabled = false;
546 | }
547 | }
548 |
549 | private void button_scopeHshow_Click(object sender, EventArgs e)
550 | {
551 | if (button_scopeHshow.Text == "Show")
552 | {
553 | scopeH.ShowScope();
554 | button_scopeHshow.Text = "Hide";
555 | label_scopeH.Enabled = true;
556 | comboBox_scopeH0.Enabled = true;
557 | comboBox_scopeH1.Enabled = true;
558 | comboBox_scopeH2.Enabled = true;
559 | comboBox_scopeHtrig.Enabled = true;
560 | }
561 | else
562 | {
563 | scopeH.HideScope();
564 | button_scopeHshow.Text = "Show";
565 | label_scopeH.Enabled = false;
566 | comboBox_scopeH0.Enabled = false;
567 | comboBox_scopeH1.Enabled = false;
568 | comboBox_scopeH2.Enabled = false;
569 | comboBox_scopeHtrig.Enabled = false;
570 | }
571 | }
572 |
573 | private void button_scopeIshow_Click(object sender, EventArgs e)
574 | {
575 | if (button_scopeIshow.Text == "Show")
576 | {
577 | scopeI.ShowScope();
578 | button_scopeIshow.Text = "Hide";
579 | label_scopeI.Enabled = true;
580 | comboBox_scopeI0.Enabled = true;
581 | comboBox_scopeI1.Enabled = true;
582 | comboBox_scopeI2.Enabled = true;
583 | comboBox_scopeItrig.Enabled = true;
584 | }
585 | else
586 | {
587 | scopeI.HideScope();
588 | button_scopeIshow.Text = "Show";
589 | label_scopeI.Enabled = false;
590 | comboBox_scopeI0.Enabled = false;
591 | comboBox_scopeI1.Enabled = false;
592 | comboBox_scopeI2.Enabled = false;
593 | comboBox_scopeItrig.Enabled = false;
594 | }
595 | }
596 |
597 | private void button_scopeJshow_Click(object sender, EventArgs e)
598 | {
599 | if (button_scopeJshow.Text == "Show")
600 | {
601 | scopeJ.ShowScope();
602 | button_scopeJshow.Text = "Hide";
603 | label_scopeJ.Enabled = true;
604 | comboBox_scopeJ0.Enabled = true;
605 | comboBox_scopeJ1.Enabled = true;
606 | comboBox_scopeJ2.Enabled = true;
607 | comboBox_scopeJtrig.Enabled = true;
608 | }
609 | else
610 | {
611 | scopeJ.HideScope();
612 | button_scopeJshow.Text = "Show";
613 | label_scopeJ.Enabled = false;
614 | comboBox_scopeJ0.Enabled = false;
615 | comboBox_scopeJ1.Enabled = false;
616 | comboBox_scopeJ2.Enabled = false;
617 | comboBox_scopeJtrig.Enabled = false;
618 | }
619 | }
620 |
621 | private void button_scopeKshow_Click(object sender, EventArgs e)
622 | {
623 | if (button_scopeKshow.Text == "Show")
624 | {
625 | scopeK.ShowScope();
626 | button_scopeKshow.Text = "Hide";
627 | label_scopeK.Enabled = true;
628 | comboBox_scopeK0.Enabled = true;
629 | comboBox_scopeK1.Enabled = true;
630 | comboBox_scopeK2.Enabled = true;
631 | comboBox_scopeKtrig.Enabled = true;
632 | }
633 | else
634 | {
635 | scopeK.HideScope();
636 | button_scopeKshow.Text = "Show";
637 | label_scopeK.Enabled = false;
638 | comboBox_scopeK0.Enabled = false;
639 | comboBox_scopeK1.Enabled = false;
640 | comboBox_scopeK2.Enabled = false;
641 | comboBox_scopeKtrig.Enabled = false;
642 | }
643 | }
644 |
645 | #endregion
646 |
647 | #region Start/Stop log and packet error event
648 |
649 | private void button_startLog_Click(object sender, EventArgs e)
650 | {
651 | if (button_startLog.Text == "Start log")
652 | {
653 | try
654 | {
655 | time = 0;
656 | file = new System.IO.StreamWriter(Directory.GetCurrentDirectory() + "\\" + textBox_filename.Text + ".csv", false);
657 | textBox_filename.Enabled = false;
658 | button_startLog.Text = "Stop log";
659 | }
660 | catch (Exception ex) { MessageBox.Show(ex.Message); }
661 | }
662 | else
663 | {
664 | closeFile();
665 | }
666 | }
667 |
668 | void daq32_packetError(object sender, EventArgs e)
669 | {
670 | if (file != null)
671 | {
672 | this.EndInvoke(this.BeginInvoke(new MethodInvoker(delegate { closeFile(); })));
673 | MessageBox.Show("Log stopped due to packet error");
674 | }
675 | }
676 |
677 | private void closeFile()
678 | {
679 | if (file != null) file.Close();
680 | file = null;
681 | textBox_filename.Enabled = true;
682 | button_startLog.Text = "Start log";
683 | }
684 |
685 | #endregion
686 |
687 | }
688 | }
--------------------------------------------------------------------------------