commit
463b017b2f
14683 changed files with 1332112 additions and 0 deletions
@ -0,0 +1 @@ |
|||
.vs |
|||
@ -0,0 +1,68 @@ |
|||
#ifndef _DAQHEADER_H |
|||
#define _DAQHEADER_H |
|||
|
|||
/*==========================================
|
|||
|
|||
Map of DAQ File |
|||
+-------------------------+ |
|||
| | |
|||
| Header | |
|||
| | |
|||
+-------------------------+ |
|||
| ChannelRange | |
|||
| (Optional) | |
|||
+-------------------------+ |
|||
| ChannelCompensation | |
|||
| (Only for PCI-9524) | |
|||
+-------------------------+ |
|||
| | |
|||
| DAQ data | |
|||
| | |
|||
| | |
|||
+-------------------------+ |
|||
|
|||
============================================*/ |
|||
|
|||
#pragma pack(push, before_include) |
|||
#pragma pack(1) |
|||
|
|||
/*size is 60 bytes*/ |
|||
typedef struct _DAQFILE_HEADER |
|||
{ |
|||
char ID[10]; //ex "ADLinkDAQ1"
|
|||
short card_type; //Pci7250, Pci9112...(include DG, HR, HG)
|
|||
short num_of_channel; //1, 2,...
|
|||
unsigned char channel_no; //used only num_of_channel is 1
|
|||
long num_of_scan; |
|||
short data_width; //0: 8 bits, 1: 16 bits, 2: 32 bits
|
|||
short channel_order; //0: 0-1-2-3, 1: 3-2-1-0, 2: custom
|
|||
short ad_range; |
|||
double scan_rate; |
|||
short num_of_channel_range; |
|||
char start_date[8]; //"12/31/99"
|
|||
char start_time[8]; //"18:30:25"
|
|||
char start_millisec[3]; //"360"
|
|||
char reserved[6]; |
|||
} |
|||
DAQFileHeader; |
|||
|
|||
|
|||
typedef struct _CHANNEL_RANGE |
|||
{ |
|||
unsigned char channel; |
|||
unsigned char range; |
|||
} |
|||
DAQChannelRange; |
|||
|
|||
|
|||
typedef struct _Channel_Compensation_9524 |
|||
{ |
|||
double residual_offset; |
|||
double residual_scaling; |
|||
} |
|||
ChannelCompensation9524; |
|||
|
|||
|
|||
#pragma pack(pop, before_include) |
|||
|
|||
#endif |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D6208_AO_OnePoint", "D6208_AO_OnePoint\D6208_AO_OnePoint.csproj", "{B2C25848-3284-4C83-8F36-288F7F0F9E29}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{B2C25848-3284-4C83-8F36-288F7F0F9E29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{B2C25848-3284-4C83-8F36-288F7F0F9E29}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{B2C25848-3284-4C83-8F36-288F7F0F9E29}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{B2C25848-3284-4C83-8F36-288F7F0F9E29}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,81 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{B2C25848-3284-4C83-8F36-288F7F0F9E29}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D6208_AO_OnePoint</RootNamespace> |
|||
<AssemblyName>D6208_AO_OnePoint</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,956 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V = 1; |
|||
public const ushort PCI_6208A = 2; |
|||
public const ushort PCI_6308V = 3; |
|||
public const ushort PCI_6308A = 4; |
|||
public const ushort PCI_7200 = 5; |
|||
public const ushort PCI_7230 = 6; |
|||
public const ushort PCI_7233 = 7; |
|||
public const ushort PCI_7234 = 8; |
|||
public const ushort PCI_7248 = 9; |
|||
public const ushort PCI_7249 = 10; |
|||
public const ushort PCI_7250 = 11; |
|||
public const ushort PCI_7252 = 12; |
|||
public const ushort PCI_7296 = 13; |
|||
public const ushort PCI_7300A_RevA = 14; |
|||
public const ushort PCI_7300A_RevB = 15; |
|||
public const ushort PCI_7432 = 16; |
|||
public const ushort PCI_7433 = 17; |
|||
public const ushort PCI_7434 = 18; |
|||
public const ushort PCI_8554 = 19; |
|||
public const ushort PCI_9111DG = 20; |
|||
public const ushort PCI_9111HR = 21; |
|||
public const ushort PCI_9112 = 22; |
|||
public const ushort PCI_9113 = 23; |
|||
public const ushort PCI_9114DG = 24; |
|||
public const ushort PCI_9114HG = 25; |
|||
public const ushort PCI_9118DG = 26; |
|||
public const ushort PCI_9118HG = 27; |
|||
public const ushort PCI_9118HR = 28; |
|||
public const ushort PCI_9810 = 29; |
|||
public const ushort PCI_9812 = 30; |
|||
public const ushort PCI_7396 = 31; |
|||
public const ushort PCI_9116 = 32; |
|||
public const ushort PCI_7256 = 33; |
|||
public const ushort PCI_7258 = 34; |
|||
public const ushort PCI_7260 = 35; |
|||
public const ushort PCI_7452 = 36; |
|||
public const ushort PCI_7442 = 37; |
|||
public const ushort PCI_7443 = 38; |
|||
public const ushort PCI_7444 = 39; |
|||
public const ushort PCI_9221 = 40; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
public const short ErrorCalibrationTimeOut =-63; |
|||
public const short ErrorUndefinedParameter =-64; |
|||
public const short ErrorInvalidBufferID =-65; |
|||
|
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl = -201; |
|||
public const short ErrorAsyncSetIoctl = -202; |
|||
public const short ErrorDBSetIoctl = -203; |
|||
public const short ErrorDBHalfReadyIoctl = -204; |
|||
public const short ErrorContOPIoctl = -205; |
|||
public const short ErrorContStatusIoctl = -206; |
|||
public const short ErrorPIOIoctl = -207; |
|||
public const short ErrorDIntSetIoctl = -208; |
|||
public const short ErrorWaitEvtIoctl = -209; |
|||
public const short ErrorOpenEvtIoctl = -210; |
|||
public const short ErrorCOSIntSetIoctl = -211; |
|||
public const short ErrorMemMapIoctl = -212; |
|||
public const short ErrorMemUMapSetIoctl = -213; |
|||
public const short ErrorCTRIoctl = -214; |
|||
public const short ErrorGetResIoctl = -215; |
|||
public const short ErrorCalIoctl = -216; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
public const ushort AD_B_2_V =23; |
|||
public const ushort AD_U_2_V =24; |
|||
public const ushort AD_B_0_2_V =25; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
// P7443
|
|||
public const ushort P7443_CH0 = 0; |
|||
public const ushort P7443_CH1 = 1; |
|||
public const ushort P7443_CH2 = 2; |
|||
public const ushort P7443_CH3 = 3; |
|||
public const ushort P7443_TTL0 = 4; |
|||
public const ushort P7443_TTL1 = 5; |
|||
// P7444
|
|||
public const ushort P7444_CH0 = 0; |
|||
public const ushort P7444_CH1 = 1; |
|||
public const ushort P7444_CH2 = 2; |
|||
public const ushort P7444_CH3 = 3; |
|||
public const ushort P7444_TTL0 = 4; |
|||
public const ushort P7444_TTL1 = 5; |
|||
|
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
/*-------- Constants for PCI-9221 --------------------*/ |
|||
//Input Type
|
|||
public const ushort P9221_AI_SingEnded = 0x0; |
|||
public const ushort P9221_AI_NonRef_SingEnded = 0x1; |
|||
public const ushort P9221_AI_Differential = 0x2; |
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9221_TRGMOD_SOFT =0x00; |
|||
public const ushort P9221_TRGMOD_ExtD =0x08; |
|||
//Trigger Source
|
|||
public const ushort P9221_TRGSRC_GPI0 =0x00; |
|||
public const ushort P9221_TRGSRC_GPI1 =0x01; |
|||
public const ushort P9221_TRGSRC_GPI2 =0x02; |
|||
public const ushort P9221_TRGSRC_GPI3 =0x03; |
|||
public const ushort P9221_TRGSRC_GPI4 =0x04; |
|||
public const ushort P9221_TRGSRC_GPI5 =0x05; |
|||
public const ushort P9221_TRGSRC_GPI6 =0x06; |
|||
public const ushort P9221_TRGSRC_GPI7 =0x07; |
|||
|
|||
//TimeBase Mode
|
|||
public const ushort P9221_AI_IntTimeBase = 0x00; |
|||
public const ushort P9221_AI_ExtTimeBase = 0x80; |
|||
//TimeBase Source
|
|||
public const ushort P9221_TimeBaseSRC_GPI0 = 0x00; |
|||
public const ushort P9221_TimeBaseSRC_GPI1 = 0x10; |
|||
public const ushort P9221_TimeBaseSRC_GPI2 = 0x20; |
|||
public const ushort P9221_TimeBaseSRC_GPI3 = 0x30; |
|||
public const ushort P9221_TimeBaseSRC_GPI4 = 0x40; |
|||
public const ushort P9221_TimeBaseSRC_GPI5 = 0x50; |
|||
public const ushort P9221_TimeBaseSRC_GPI6 = 0x60; |
|||
public const ushort P9221_TimeBaseSRC_GPI7 = 0x70; |
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//General Purpose Timer/Counter for 9221
|
|||
//Counter Mode
|
|||
public const ushort SimpleGatedEventCNT = 0x01; |
|||
public const ushort SinglePeriodMSR = 0x02; |
|||
public const ushort SinglePulseWidthMSR = 0x03; |
|||
public const ushort SingleGatedPulseGen = 0x04; |
|||
public const ushort SingleTrigPulseGen = 0x05; |
|||
public const ushort RetrigSinglePulseGen = 0x06; |
|||
public const ushort SingleTrigContPulseGen = 0x07; |
|||
public const ushort ContGatedPulseGen = 0x08; |
|||
public const ushort EdgeSeparationMSR = 0x09; |
|||
public const ushort SingleTrigContPulseGenPWM = 0x0a; |
|||
public const ushort ContGatedPulseGenPWM = 0x0b; |
|||
public const ushort CW_CCW_Encoder = 0x0c; |
|||
public const ushort x1_AB_Phase_Encoder = 0x0d; |
|||
public const ushort x2_AB_Phase_Encoder = 0x0e; |
|||
public const ushort x4_AB_Phase_Encoder = 0x0f; |
|||
public const ushort Phase_Z = 0x10; |
|||
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLK_SRC_Ext = 0x01; |
|||
public const ushort GPTC_CLK_SRC_Int = 0x00; |
|||
public const ushort GPTC_GATE_SRC_Ext = 0x02; |
|||
public const ushort GPTC_GATE_SRC_Int = 0x00; |
|||
public const ushort GPTC_UPDOWN_Ext = 0x04; |
|||
public const ushort GPTC_UPDOWN_Int = 0x00; |
|||
|
|||
//GPTC clock polarity
|
|||
public const ushort GPTC_CLKSRC_LACTIVE = 0x01; |
|||
public const ushort GPTC_CLKSRC_HACTIVE = 0x00; |
|||
public const ushort GPTC_GATE_LACTIVE = 0x02; |
|||
public const ushort GPTC_GATE_HACTIVE = 0x00; |
|||
public const ushort GPTC_UPDOWN_LACTIVE = 0x04; |
|||
public const ushort GPTC_UPDOWN_HACTIVE = 0x00; |
|||
public const ushort GPTC_OUTPUT_LACTIVE = 0x08; |
|||
public const ushort GPTC_OUTPUT_HACTIVE = 0x00; |
|||
|
|||
public const ushort IntGate = 0x0; |
|||
public const ushort IntUpDnCTR = 0x1; |
|||
public const ushort IntENABLE = 0x2; |
|||
|
|||
public const ushort GPTC_EZ0_ClearPhase0 = 0x0; |
|||
public const ushort GPTC_EZ0_ClearPhase1 = 0x1; |
|||
public const ushort GPTC_EZ0_ClearPhase2 = 0x2; |
|||
public const ushort GPTC_EZ0_ClearPhase3 = 0x3; |
|||
|
|||
public const ushort GPTC_EZ0_ClearMode0 = 0x0; |
|||
public const ushort GPTC_EZ0_ClearMode1 = 0x1; |
|||
public const ushort GPTC_EZ0_ClearMode2 = 0x2; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM = 0; |
|||
public const ushort WDT_ARM = 1; |
|||
public const ushort WDT_RESTART = 2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN = 0; |
|||
public const ushort EMGSHDN_PTN = 1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 = 1; |
|||
public const ushort INIT_PTN_CH2 = 2; //only for 7444
|
|||
public const ushort INIT_PTN_CH3 = 3; //only for 7444
|
|||
public const ushort SAFTOUT_PTN_CH0 = 4; |
|||
public const ushort SAFTOUT_PTN_CH1 = 5; |
|||
public const ushort SAFTOUT_PTN_CH2 = 6; //only for 7444
|
|||
public const ushort SAFTOUT_PTN_CH3 = 7; //only for 7444
|
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN = 0; |
|||
public const ushort BCD = 1; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
/*EEPROM*/ |
|||
public const ushort EEPROM_DEFAULT_BANK =0; |
|||
public const ushort EEPROM_USER_BANK1 = 1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9221_Config(ushort CardNumber, ushort TrigCtrl, bool AutoResetBuf); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval(ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9221_CounterInterval(ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ScanReadChannels(ushort CardNumber, ushort wNumChans, ushort wAdRanges, ushort[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadMultiChannels(ushort CardNumber, ushort wNumChans, ushort[] pwChans, ushort[] pwAdRanges, ushort[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHandled(ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferToFile(ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_SetTimeOut(ushort CardNumber, uint dwTimeOut); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContBufferSetup(ushort CardNumber, ushort[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContBufferReset(ushort CardNumber); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBuffersHandled(ushort wCardNumber, ushort bufcnt, ushort[] bufs); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_SimuWritePort(ushort wCardNumber, ushort wNumChans, uint[] pdwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GPTC_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GPTC_Control (ushort wCardNumber, ushort wGCtr, ushort ParamID, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GPTC_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GPTC_Setup (ushort wCardNumber, ushort wGCtr, ushort wMode, ushort wSrcCtrl, ushort wPolCtrl, uint LReg1_Val, uint LReg2_Val); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GPTC_Status(ushort wCardNumber, ushort wGCtr, out ushort pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short PCI_DB_Auto_Calibration_ALL(ushort wCardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short PCI_Load_CAL_Data(ushort wCardNumber, ushort bank); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short PCI_EEPROM_CAL_Constant_Update(ushort wCardNumber, ushort bank); |
|||
/*----------------------------------------------------------------------------*/ |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
namespace D6208_AO_OnePoint |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.textBox1 = new System.Windows.Forms.TextBox(); |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(136, 34); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(13, 12); |
|||
this.label1.TabIndex = 5; |
|||
this.label1.Text = "V"; |
|||
//
|
|||
// textBox1
|
|||
//
|
|||
this.textBox1.Location = new System.Drawing.Point(32, 23); |
|||
this.textBox1.Name = "textBox1"; |
|||
this.textBox1.Size = new System.Drawing.Size(99, 22); |
|||
this.textBox1.TabIndex = 4; |
|||
this.textBox1.Text = "2"; |
|||
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(174, 23); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(93, 22); |
|||
this.button1.TabIndex = 3; |
|||
this.button1.Text = "Output"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(292, 79); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.textBox1); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "Form1"; |
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox textBox1; |
|||
private System.Windows.Forms.Button button1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,55 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D6208_AO_OnePoint |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
public short m_dev; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_dev = DASK.Register_Card(DASK.PCI_6208V, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
} |
|||
} |
|||
|
|||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
short ret; |
|||
double out_value; |
|||
if (Double.TryParse(textBox1.Text, out out_value)) |
|||
{ |
|||
ret = DASK.AO_VWriteChannel((ushort)m_dev, 0, out_value); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AO_VWriteChannel error!"); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
MessageBox.Show("Input error!"); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D6208_AO_OnePoint |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D6208_AO_OnePoint")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D6208_AO_OnePoint")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2006")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("89d7e9b7-d784-45ba-b1a9-75bb7a11363d")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D6208_AO_OnePoint.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D6208_AO_OnePoint.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D6208_AO_OnePoint.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D7250_DIO", "D7250_DIO\D7250_DIO.csproj", "{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,81 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{53EBDCB0-FF0D-4E67-B67E-A19FB38D9DC5}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D7250_DIO</RootNamespace> |
|||
<AssemblyName>D7250_DIO</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,800 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V =1; |
|||
public const ushort PCI_6208A =2; |
|||
public const ushort PCI_6308V =3; |
|||
public const ushort PCI_6308A =4; |
|||
public const ushort PCI_7200 =5; |
|||
public const ushort PCI_7230 =6; |
|||
public const ushort PCI_7233 =7; |
|||
public const ushort PCI_7234 =8; |
|||
public const ushort PCI_7248 =9; |
|||
public const ushort PCI_7249 =10; |
|||
public const ushort PCI_7250 =11; |
|||
public const ushort PCI_7252 =12; |
|||
public const ushort PCI_7296 =13; |
|||
public const ushort PCI_7300A_RevA =14; |
|||
public const ushort PCI_7300A_RevB =15; |
|||
public const ushort PCI_7432 =16; |
|||
public const ushort PCI_7433 =17; |
|||
public const ushort PCI_7434 =18; |
|||
public const ushort PCI_8554 =19; |
|||
public const ushort PCI_9111DG =20; |
|||
public const ushort PCI_9111HR =21; |
|||
public const ushort PCI_9112 =22; |
|||
public const ushort PCI_9113 =23; |
|||
public const ushort PCI_9114DG =24; |
|||
public const ushort PCI_9114HG =25; |
|||
public const ushort PCI_9118DG =26; |
|||
public const ushort PCI_9118HG =27; |
|||
public const ushort PCI_9118HR =28; |
|||
public const ushort PCI_9810 =29; |
|||
public const ushort PCI_9812 =30; |
|||
public const ushort PCI_7396 =31; |
|||
public const ushort PCI_9116 =32; |
|||
public const ushort PCI_7256 =33; |
|||
public const ushort PCI_7258 =34; |
|||
public const ushort PCI_7260 =35; |
|||
public const ushort PCI_7452 =36; |
|||
public const ushort PCI_7442 =37; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl =-201; |
|||
public const short ErrorAsyncSetIoctl =-202; |
|||
public const short ErrorDBSetIoctl =-203; |
|||
public const short ErrorDBHalfReadyIoctl =-204; |
|||
public const short ErrorContOPIoctl =-205; |
|||
public const short ErrorContStatusIoctl =-206; |
|||
public const short ErrorPIOIoctl =-207; |
|||
public const short ErrorDIntSetIoctl =-208; |
|||
public const short ErrorWaitEvtIoctl =-209; |
|||
public const short ErrorOpenEvtIoctl =-210; |
|||
public const short ErrorCOSIntSetIoctl =-211; |
|||
public const short ErrorMemMapIoctl =-212; |
|||
public const short ErrorMemUMapSetIoctl =-213; |
|||
public const short ErrorCTRIoctl =-214; |
|||
public const short ErrorGetResIoctl =-215; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM =0; |
|||
public const ushort WDT_ARM =1; |
|||
public const ushort WDT_RESTART =2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN =0; |
|||
public const ushort EMGSHDN_PTN =1; |
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN =0; |
|||
public const ushort BCD =1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 =1; |
|||
public const ushort SAFTOUT_PTN_CH0 =4; |
|||
public const ushort SAFTOUT_PTN_CH1 =5; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval (ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
namespace D7250_DIO |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.button2 = new System.Windows.Forms.Button(); |
|||
this.label2 = new System.Windows.Forms.Label(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.textBox2 = new System.Windows.Forms.TextBox(); |
|||
this.textBox1 = new System.Windows.Forms.TextBox(); |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// button2
|
|||
//
|
|||
this.button2.Location = new System.Drawing.Point(168, 80); |
|||
this.button2.Name = "button2"; |
|||
this.button2.Size = new System.Drawing.Size(100, 23); |
|||
this.button2.TabIndex = 11; |
|||
this.button2.Text = "Read From DI"; |
|||
this.button2.UseVisualStyleBackColor = true; |
|||
this.button2.Click += new System.EventHandler(this.button2_Click); |
|||
//
|
|||
// label2
|
|||
//
|
|||
this.label2.AutoSize = true; |
|||
this.label2.Location = new System.Drawing.Point(166, 21); |
|||
this.label2.Name = "label2"; |
|||
this.label2.Size = new System.Drawing.Size(20, 12); |
|||
this.label2.TabIndex = 10; |
|||
this.label2.Text = "DI:"; |
|||
this.label2.Click += new System.EventHandler(this.label2_Click); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(22, 21); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(24, 12); |
|||
this.label1.TabIndex = 9; |
|||
this.label1.Text = "DO:"; |
|||
this.label1.Click += new System.EventHandler(this.label1_Click); |
|||
//
|
|||
// textBox2
|
|||
//
|
|||
this.textBox2.Location = new System.Drawing.Point(168, 36); |
|||
this.textBox2.Name = "textBox2"; |
|||
this.textBox2.Size = new System.Drawing.Size(100, 22); |
|||
this.textBox2.TabIndex = 8; |
|||
this.textBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; |
|||
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); |
|||
//
|
|||
// textBox1
|
|||
//
|
|||
this.textBox1.Location = new System.Drawing.Point(22, 36); |
|||
this.textBox1.Name = "textBox1"; |
|||
this.textBox1.Size = new System.Drawing.Size(100, 22); |
|||
this.textBox1.TabIndex = 7; |
|||
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; |
|||
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(24, 80); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(98, 23); |
|||
this.button1.TabIndex = 6; |
|||
this.button1.Text = "Write To DO"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(292, 137); |
|||
this.Controls.Add(this.button2); |
|||
this.Controls.Add(this.label2); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.textBox2); |
|||
this.Controls.Add(this.textBox1); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "Form1"; |
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button button2; |
|||
private System.Windows.Forms.Label label2; |
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.TextBox textBox2; |
|||
private System.Windows.Forms.TextBox textBox1; |
|||
private System.Windows.Forms.Button button1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,89 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7250_DIO |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
public short m_dev; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_dev = DASK.Register_Card(DASK.PCI_7250, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
short ret; |
|||
int out_value; |
|||
if (Int32.TryParse(textBox1.Text, out out_value)) |
|||
{ |
|||
ret = DASK.DO_WritePort((ushort)m_dev, 0, (uint)out_value); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("DO_WritePort error!"); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
MessageBox.Show("Input error!"); |
|||
} |
|||
} |
|||
|
|||
private void button2_Click(object sender, EventArgs e) |
|||
{ |
|||
short ret; |
|||
uint int_value; |
|||
ret = DASK.DI_ReadPort((ushort)m_dev, 0, out int_value); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("D2K_DI_ReadPort error!"); |
|||
return; |
|||
} |
|||
textBox2.Text = String.Format("{0}", int_value); |
|||
} |
|||
|
|||
private void label2_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void label1_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void textBox2_TextChanged(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void textBox1_TextChanged(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7250_DIO |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D7250_DIO")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D7250_DIO")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2006")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("66557528-c2f9-4c61-b148-6b17ae1e3032")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7250_DIO.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D7250_DIO.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7250_DIO.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D7300_DI_Single_buffer_Sync", "D7300_DI_Single_buffer_Sync\D7300_DI_Single_buffer_Sync.csproj", "{EC5650E8-5DBA-459B-97B3-04436CF6BD86}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{EC5650E8-5DBA-459B-97B3-04436CF6BD86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{EC5650E8-5DBA-459B-97B3-04436CF6BD86}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{EC5650E8-5DBA-459B-97B3-04436CF6BD86}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{EC5650E8-5DBA-459B-97B3-04436CF6BD86}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,81 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{EC5650E8-5DBA-459B-97B3-04436CF6BD86}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D7300_DI_Single_buffer_Sync</RootNamespace> |
|||
<AssemblyName>D7300_DI_Single_buffer_Sync</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,800 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V =1; |
|||
public const ushort PCI_6208A =2; |
|||
public const ushort PCI_6308V =3; |
|||
public const ushort PCI_6308A =4; |
|||
public const ushort PCI_7200 =5; |
|||
public const ushort PCI_7230 =6; |
|||
public const ushort PCI_7233 =7; |
|||
public const ushort PCI_7234 =8; |
|||
public const ushort PCI_7248 =9; |
|||
public const ushort PCI_7249 =10; |
|||
public const ushort PCI_7250 =11; |
|||
public const ushort PCI_7252 =12; |
|||
public const ushort PCI_7296 =13; |
|||
public const ushort PCI_7300A_RevA =14; |
|||
public const ushort PCI_7300A_RevB =15; |
|||
public const ushort PCI_7432 =16; |
|||
public const ushort PCI_7433 =17; |
|||
public const ushort PCI_7434 =18; |
|||
public const ushort PCI_8554 =19; |
|||
public const ushort PCI_9111DG =20; |
|||
public const ushort PCI_9111HR =21; |
|||
public const ushort PCI_9112 =22; |
|||
public const ushort PCI_9113 =23; |
|||
public const ushort PCI_9114DG =24; |
|||
public const ushort PCI_9114HG =25; |
|||
public const ushort PCI_9118DG =26; |
|||
public const ushort PCI_9118HG =27; |
|||
public const ushort PCI_9118HR =28; |
|||
public const ushort PCI_9810 =29; |
|||
public const ushort PCI_9812 =30; |
|||
public const ushort PCI_7396 =31; |
|||
public const ushort PCI_9116 =32; |
|||
public const ushort PCI_7256 =33; |
|||
public const ushort PCI_7258 =34; |
|||
public const ushort PCI_7260 =35; |
|||
public const ushort PCI_7452 =36; |
|||
public const ushort PCI_7442 =37; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl =-201; |
|||
public const short ErrorAsyncSetIoctl =-202; |
|||
public const short ErrorDBSetIoctl =-203; |
|||
public const short ErrorDBHalfReadyIoctl =-204; |
|||
public const short ErrorContOPIoctl =-205; |
|||
public const short ErrorContStatusIoctl =-206; |
|||
public const short ErrorPIOIoctl =-207; |
|||
public const short ErrorDIntSetIoctl =-208; |
|||
public const short ErrorWaitEvtIoctl =-209; |
|||
public const short ErrorOpenEvtIoctl =-210; |
|||
public const short ErrorCOSIntSetIoctl =-211; |
|||
public const short ErrorMemMapIoctl =-212; |
|||
public const short ErrorMemUMapSetIoctl =-213; |
|||
public const short ErrorCTRIoctl =-214; |
|||
public const short ErrorGetResIoctl =-215; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM =0; |
|||
public const ushort WDT_ARM =1; |
|||
public const ushort WDT_RESTART =2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN =0; |
|||
public const ushort EMGSHDN_PTN =1; |
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN =0; |
|||
public const ushort BCD =1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 =1; |
|||
public const ushort SAFTOUT_PTN_CH0 =4; |
|||
public const ushort SAFTOUT_PTN_CH1 =5; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval (ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
} |
|||
@ -0,0 +1,88 @@ |
|||
namespace D7300_DI_Single_buffer_Sync |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.listBox1 = new System.Windows.Forms.ListBox(); |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(49, 151); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(73, 29); |
|||
this.button1.TabIndex = 0; |
|||
this.button1.Text = "Start"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// listBox1
|
|||
//
|
|||
this.listBox1.FormattingEnabled = true; |
|||
this.listBox1.ItemHeight = 12; |
|||
this.listBox1.Location = new System.Drawing.Point(12, 33); |
|||
this.listBox1.Name = "listBox1"; |
|||
this.listBox1.Size = new System.Drawing.Size(143, 112); |
|||
this.listBox1.TabIndex = 1; |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Location = new System.Drawing.Point(12, 9); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(57, 12); |
|||
this.label1.TabIndex = 2; |
|||
this.label1.Text = "Input Data:"; |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(172, 186); |
|||
this.Controls.Add(this.label1); |
|||
this.Controls.Add(this.listBox1); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "Form1"; |
|||
this.InputLanguageChanged += new System.Windows.Forms.InputLanguageChangedEventHandler(this.Form1_InputLanguageChanged); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button button1; |
|||
private System.Windows.Forms.ListBox listBox1; |
|||
private System.Windows.Forms.Label label1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,62 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7300_DI_Single_buffer_Sync |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
ushort[] data_buffer = new ushort[100]; |
|||
public short m_dev; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_dev = DASK.Register_Card(DASK.PCI_7300A_RevB, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Form1_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
int i; |
|||
short err; |
|||
err = DASK.DI_7300B_Config((ushort)m_dev, 16, DASK.TRIG_INT_PACER, DASK.P7300_WAIT_NO, DASK.P7300_TERM_OFF, DASK.P7300_DIREQ_POS | DASK.P7300_DIACK_POS | DASK.P7300_DITRIG_POS, false, false); |
|||
if (err != 0) |
|||
{ |
|||
MessageBox.Show("DI_7300B_Config error!"); |
|||
return; |
|||
} |
|||
err = DASK.DI_ContReadPort((ushort)m_dev, 0, data_buffer, 100, 10000, DASK.SYNCH_OP); |
|||
if (err != 0) |
|||
{ |
|||
MessageBox.Show("DI_ContReadPort error!"); |
|||
return; |
|||
} |
|||
listBox1.Items.Clear(); |
|||
for (i = 0; i < 100; i++) |
|||
{ |
|||
listBox1.Items.Add(data_buffer[i]); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7300_DI_Single_buffer_Sync |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D7300_DI_Single_buffer_Sync")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D7300_DI_Single_buffer_Sync")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2007")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("423fc586-4fa1-45ba-a51a-3824a82dd13b")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7300_DI_Single_buffer_Sync.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D7300_DI_Single_buffer_Sync.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7300_DI_Single_buffer_Sync.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D7300_DO_Single_Buffer_Sync", "D7300_DO_Single_Buffer_Sync\D7300_DO_Single_Buffer_Sync.csproj", "{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}.Debug|Any CPU.ActiveCfg = Release|Any CPU |
|||
{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}.Debug|Any CPU.Build.0 = Release|Any CPU |
|||
{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,81 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{DE60F0FD-5710-4C15-BC88-560E90BF1AC4}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D7300_DO_Single_Buffer_Sync</RootNamespace> |
|||
<AssemblyName>D7300_DO_Single_Buffer_Sync</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,800 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V =1; |
|||
public const ushort PCI_6208A =2; |
|||
public const ushort PCI_6308V =3; |
|||
public const ushort PCI_6308A =4; |
|||
public const ushort PCI_7200 =5; |
|||
public const ushort PCI_7230 =6; |
|||
public const ushort PCI_7233 =7; |
|||
public const ushort PCI_7234 =8; |
|||
public const ushort PCI_7248 =9; |
|||
public const ushort PCI_7249 =10; |
|||
public const ushort PCI_7250 =11; |
|||
public const ushort PCI_7252 =12; |
|||
public const ushort PCI_7296 =13; |
|||
public const ushort PCI_7300A_RevA =14; |
|||
public const ushort PCI_7300A_RevB =15; |
|||
public const ushort PCI_7432 =16; |
|||
public const ushort PCI_7433 =17; |
|||
public const ushort PCI_7434 =18; |
|||
public const ushort PCI_8554 =19; |
|||
public const ushort PCI_9111DG =20; |
|||
public const ushort PCI_9111HR =21; |
|||
public const ushort PCI_9112 =22; |
|||
public const ushort PCI_9113 =23; |
|||
public const ushort PCI_9114DG =24; |
|||
public const ushort PCI_9114HG =25; |
|||
public const ushort PCI_9118DG =26; |
|||
public const ushort PCI_9118HG =27; |
|||
public const ushort PCI_9118HR =28; |
|||
public const ushort PCI_9810 =29; |
|||
public const ushort PCI_9812 =30; |
|||
public const ushort PCI_7396 =31; |
|||
public const ushort PCI_9116 =32; |
|||
public const ushort PCI_7256 =33; |
|||
public const ushort PCI_7258 =34; |
|||
public const ushort PCI_7260 =35; |
|||
public const ushort PCI_7452 =36; |
|||
public const ushort PCI_7442 =37; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl =-201; |
|||
public const short ErrorAsyncSetIoctl =-202; |
|||
public const short ErrorDBSetIoctl =-203; |
|||
public const short ErrorDBHalfReadyIoctl =-204; |
|||
public const short ErrorContOPIoctl =-205; |
|||
public const short ErrorContStatusIoctl =-206; |
|||
public const short ErrorPIOIoctl =-207; |
|||
public const short ErrorDIntSetIoctl =-208; |
|||
public const short ErrorWaitEvtIoctl =-209; |
|||
public const short ErrorOpenEvtIoctl =-210; |
|||
public const short ErrorCOSIntSetIoctl =-211; |
|||
public const short ErrorMemMapIoctl =-212; |
|||
public const short ErrorMemUMapSetIoctl =-213; |
|||
public const short ErrorCTRIoctl =-214; |
|||
public const short ErrorGetResIoctl =-215; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM =0; |
|||
public const ushort WDT_ARM =1; |
|||
public const ushort WDT_RESTART =2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN =0; |
|||
public const ushort EMGSHDN_PTN =1; |
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN =0; |
|||
public const ushort BCD =1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 =1; |
|||
public const ushort SAFTOUT_PTN_CH0 =4; |
|||
public const ushort SAFTOUT_PTN_CH1 =5; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval (ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
} |
|||
@ -0,0 +1,63 @@ |
|||
namespace D7300_DO_Single_Buffer_Sync |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(101, 45); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(73, 29); |
|||
this.button1.TabIndex = 1; |
|||
this.button1.Text = "Start"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(292, 116); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "AO"; |
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button button1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,61 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7300_DO_Single_Buffer_Sync |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
ushort[] data_buffer = new ushort[1000]; |
|||
public short m_dev; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_dev = DASK.Register_Card(DASK.PCI_7300A_RevB, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
int i; |
|||
short err; |
|||
for (i = 0; i < 1000; i++) |
|||
{ |
|||
data_buffer[i] = (ushort)i; |
|||
} |
|||
err = DASK.DO_7300B_Config((ushort)m_dev, 16, DASK.TRIG_INT_PACER, DASK.P7300_WAIT_NO, DASK.P7300_TERM_OFF, 0, 0x29810); |
|||
if (err != 0) |
|||
{ |
|||
MessageBox.Show("DO_7300B_Config error!"); |
|||
return; |
|||
} |
|||
err = DASK.DO_ContWritePort((ushort)m_dev, 0, data_buffer, 1000,10, 10000, DASK.SYNCH_OP); |
|||
if (err != 0) |
|||
{ |
|||
MessageBox.Show("DO_ContWritePort error!"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D7300_DO_Single_Buffer_Sync |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D7300_DO_Single_Buffer_Sync")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D7300_DO_Single_Buffer_Sync")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2007")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("bcc3a5fa-3ea0-471d-a2b0-71fc2cf1bb64")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7300_DO_Single_Buffer_Sync.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D7300_DO_Single_Buffer_Sync.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D7300_DO_Single_Buffer_Sync.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D9112_AI_Single_Buffer_Callback", "D9112_AI_Single_Buffer_Callback\D9112_AI_Single_Buffer_Callback.csproj", "{F270782E-3929-4F29-B83D-049EB4BA7258}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{F270782E-3929-4F29-B83D-049EB4BA7258}.Debug|Any CPU.ActiveCfg = Release|Any CPU |
|||
{F270782E-3929-4F29-B83D-049EB4BA7258}.Debug|Any CPU.Build.0 = Release|Any CPU |
|||
{F270782E-3929-4F29-B83D-049EB4BA7258}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{F270782E-3929-4F29-B83D-049EB4BA7258}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,107 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{F270782E-3929-4F29-B83D-049EB4BA7258}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D9112_AI_Single_Buffer_Callback</RootNamespace> |
|||
<AssemblyName>D9112_AI_Single_Buffer_Callback</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<COMReference Include="AxDBGRAPHLib"> |
|||
<Guid>{5CB6BA63-F26A-11D2-BA6D-0080AD747B35}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>4</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>aximp</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="DBGRAPHLib"> |
|||
<Guid>{5CB6BA63-F26A-11D2-BA6D-0080AD747B35}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>4</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>tlbimp</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="stdole"> |
|||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,800 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V =1; |
|||
public const ushort PCI_6208A =2; |
|||
public const ushort PCI_6308V =3; |
|||
public const ushort PCI_6308A =4; |
|||
public const ushort PCI_7200 =5; |
|||
public const ushort PCI_7230 =6; |
|||
public const ushort PCI_7233 =7; |
|||
public const ushort PCI_7234 =8; |
|||
public const ushort PCI_7248 =9; |
|||
public const ushort PCI_7249 =10; |
|||
public const ushort PCI_7250 =11; |
|||
public const ushort PCI_7252 =12; |
|||
public const ushort PCI_7296 =13; |
|||
public const ushort PCI_7300A_RevA =14; |
|||
public const ushort PCI_7300A_RevB =15; |
|||
public const ushort PCI_7432 =16; |
|||
public const ushort PCI_7433 =17; |
|||
public const ushort PCI_7434 =18; |
|||
public const ushort PCI_8554 =19; |
|||
public const ushort PCI_9111DG =20; |
|||
public const ushort PCI_9111HR =21; |
|||
public const ushort PCI_9112 =22; |
|||
public const ushort PCI_9113 =23; |
|||
public const ushort PCI_9114DG =24; |
|||
public const ushort PCI_9114HG =25; |
|||
public const ushort PCI_9118DG =26; |
|||
public const ushort PCI_9118HG =27; |
|||
public const ushort PCI_9118HR =28; |
|||
public const ushort PCI_9810 =29; |
|||
public const ushort PCI_9812 =30; |
|||
public const ushort PCI_7396 =31; |
|||
public const ushort PCI_9116 =32; |
|||
public const ushort PCI_7256 =33; |
|||
public const ushort PCI_7258 =34; |
|||
public const ushort PCI_7260 =35; |
|||
public const ushort PCI_7452 =36; |
|||
public const ushort PCI_7442 =37; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl =-201; |
|||
public const short ErrorAsyncSetIoctl =-202; |
|||
public const short ErrorDBSetIoctl =-203; |
|||
public const short ErrorDBHalfReadyIoctl =-204; |
|||
public const short ErrorContOPIoctl =-205; |
|||
public const short ErrorContStatusIoctl =-206; |
|||
public const short ErrorPIOIoctl =-207; |
|||
public const short ErrorDIntSetIoctl =-208; |
|||
public const short ErrorWaitEvtIoctl =-209; |
|||
public const short ErrorOpenEvtIoctl =-210; |
|||
public const short ErrorCOSIntSetIoctl =-211; |
|||
public const short ErrorMemMapIoctl =-212; |
|||
public const short ErrorMemUMapSetIoctl =-213; |
|||
public const short ErrorCTRIoctl =-214; |
|||
public const short ErrorGetResIoctl =-215; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM =0; |
|||
public const ushort WDT_ARM =1; |
|||
public const ushort WDT_RESTART =2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN =0; |
|||
public const ushort EMGSHDN_PTN =1; |
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN =0; |
|||
public const ushort BCD =1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 =1; |
|||
public const ushort SAFTOUT_PTN_CH0 =4; |
|||
public const ushort SAFTOUT_PTN_CH1 =5; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval (ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
namespace D9112_AI_Single_Buffer_Callback |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.axDGraph1 = new AxDBGRAPHLib.AxDGraph(); |
|||
((System.ComponentModel.ISupportInitialize)(this.axDGraph1)).BeginInit(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(98, 242); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(90, 30); |
|||
this.button1.TabIndex = 2; |
|||
this.button1.Text = "Start"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// axDGraph1
|
|||
//
|
|||
this.axDGraph1.Enabled = true; |
|||
this.axDGraph1.Location = new System.Drawing.Point(0, 0); |
|||
this.axDGraph1.Name = "axDGraph1"; |
|||
this.axDGraph1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axDGraph1.OcxState"))); |
|||
this.axDGraph1.Size = new System.Drawing.Size(292, 236); |
|||
this.axDGraph1.TabIndex = 3; |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(292, 273); |
|||
this.Controls.Add(this.axDGraph1); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "Form1"; |
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
((System.ComponentModel.ISupportInitialize)(this.axDGraph1)).EndInit(); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button button1; |
|||
private AxDBGRAPHLib.AxDGraph axDGraph1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,76 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D9112_AI_Single_Buffer_Callback |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
public short m_dev; |
|||
CallbackDelegate m_del; |
|||
ushort[] m_data_buffer = new ushort[1000]; |
|||
double[] m_voltage_array = new double[1000]; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_del = new CallbackDelegate(Callback); |
|||
m_dev = DASK.Register_Card(DASK.PCI_9112, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
short ret; |
|||
ret = DASK.AI_EventCallBack((ushort)m_dev, 1, DASK.AIEnd, m_del); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("D2K_AI_EventCallBack error!"); |
|||
return; |
|||
} |
|||
ret = DASK.AI_9112_Config((ushort)m_dev, DASK.TRIG_INT_PACER); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_9112_Config error!"); |
|||
return; |
|||
} |
|||
ret = DASK.AI_ContReadChannel((ushort)m_dev, 0, DASK.AD_B_5_V, m_data_buffer, 1000, 10000, DASK.ASYNCH_OP); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_ContReadChannel error!"); |
|||
return; |
|||
} |
|||
} |
|||
private void Callback() |
|||
{ |
|||
short ret; |
|||
ret = DASK.AI_ContVScale((ushort)m_dev, DASK.AD_B_5_V, m_data_buffer, m_voltage_array, 1000); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("D2K_AI_ContVScale error!"); |
|||
return; |
|||
} |
|||
axDGraph1.PlotGraph(m_voltage_array, 0); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<data name="axDGraph1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value> |
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w |
|||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 |
|||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAcAIAAAIB |
|||
AAAAAQAAAAAZAAAAQ29weXJpZ2h0IChjKSAyMDAyIEFETGluawAAAABCAgAABAACAC4eAABkGAAABwAA |
|||
AADU0MgAAANS4wuRj84RneMAqgBLuFEBiAAAvALcfAEACLdzstOp+sXpAAABAAAAAAAAAAAAAADoAwAA |
|||
AAAAAAAAAAAAAS4AABAAAAAFAAAAAAAAAAAAAAAAAAAAEAAAAAUAAAAAAAAAAAAAAAAAAAAQAAAABQAA |
|||
AAAAAAAAAAAAAAAAAAABAAEBAQAAAAAAAAAAAACAgIAAQEBAAAAAAAAAEAAAAAUAAAAbwh9sAAAAAAAA |
|||
FEAQAAAABQAAABvCH2wAAAAAAAAUwBAAAAAFAGkAIHwuAQAAAAAA/q9AEAAAAAUAaQAgfC4BAAAAAAAA |
|||
AAABLgAAAAAQAAAABQAAAAAAAAAAAAAAAAAAABAAAAAFAAAAAAAAAAAAAAAAAAAAEAAAAAUAAAAAAAAA |
|||
AAAAAAAAAAABAAEAAQEAAAAAAAAAAAAAgICAAEBAQAAAAAAAGAAAAAAAAAAAAAEAAADoef8AAAD/AAAA |
|||
/wAAABgAAAAAAAAAAAABAAAA6Hn/gAAA/4AAAP+AAAAYAAAAAAAAAAAAAQAAAOh5//8AAP//AAD//wAA |
|||
GAAAAAAAAAAAAAEAAADoeQD/AAAA/wAAAP8AABgAAAAAAAAAAAABAAAA6HkA//8AAP//AAD//wAYAAAA |
|||
AAAAAAAAAQAAAOh5AAD/AAAA/wAAAP8AGAAAAAAAAAAAAAEAAADoef8A/wD/AP8A/wD/ABgAAAAAAAAA |
|||
AAABAAAA6HnAwMAAwMDAAMDAwAABAQAL |
|||
</value> |
|||
</data> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D9112_AI_Single_Buffer_Callback |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D9112_AI_Single_Buffer_Callback")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D9112_AI_Single_Buffer_Callback")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2007")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("0a21be72-a20c-4f81-bc5d-26046635ce2c")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D9112_AI_Single_Buffer_Callback.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D9112_AI_Single_Buffer_Callback.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D9112_AI_Single_Buffer_Callback.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D9112_AI_Single_Buffer_Check", "D9112_AI_Single_Buffer_Check\D9112_AI_Single_Buffer_Check.csproj", "{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}.Debug|Any CPU.ActiveCfg = Release|Any CPU |
|||
{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}.Debug|Any CPU.Build.0 = Release|Any CPU |
|||
{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,107 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{6FC4E9E2-C4DA-4B67-B70B-52005582EDB3}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>D9112_AI_Single_Buffer_Check</RootNamespace> |
|||
<AssemblyName>D9112_AI_Single_Buffer_Check</AssemblyName> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Dask.cs" /> |
|||
<Compile Include="Form1.cs"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.cs"> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.cs</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<COMReference Include="AxDBGRAPHLib"> |
|||
<Guid>{5CB6BA63-F26A-11D2-BA6D-0080AD747B35}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>4</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>aximp</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="DBGRAPHLib"> |
|||
<Guid>{5CB6BA63-F26A-11D2-BA6D-0080AD747B35}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>4</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>tlbimp</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
<COMReference Include="stdole"> |
|||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid> |
|||
<VersionMajor>2</VersionMajor> |
|||
<VersionMinor>0</VersionMinor> |
|||
<Lcid>0</Lcid> |
|||
<WrapperTool>primary</WrapperTool> |
|||
<Isolated>False</Isolated> |
|||
</COMReference> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,800 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System; |
|||
|
|||
public delegate void CallbackDelegate(); |
|||
|
|||
public class DASK |
|||
{ |
|||
//ADLink PCI Card Type
|
|||
public const ushort PCI_6208V =1; |
|||
public const ushort PCI_6208A =2; |
|||
public const ushort PCI_6308V =3; |
|||
public const ushort PCI_6308A =4; |
|||
public const ushort PCI_7200 =5; |
|||
public const ushort PCI_7230 =6; |
|||
public const ushort PCI_7233 =7; |
|||
public const ushort PCI_7234 =8; |
|||
public const ushort PCI_7248 =9; |
|||
public const ushort PCI_7249 =10; |
|||
public const ushort PCI_7250 =11; |
|||
public const ushort PCI_7252 =12; |
|||
public const ushort PCI_7296 =13; |
|||
public const ushort PCI_7300A_RevA =14; |
|||
public const ushort PCI_7300A_RevB =15; |
|||
public const ushort PCI_7432 =16; |
|||
public const ushort PCI_7433 =17; |
|||
public const ushort PCI_7434 =18; |
|||
public const ushort PCI_8554 =19; |
|||
public const ushort PCI_9111DG =20; |
|||
public const ushort PCI_9111HR =21; |
|||
public const ushort PCI_9112 =22; |
|||
public const ushort PCI_9113 =23; |
|||
public const ushort PCI_9114DG =24; |
|||
public const ushort PCI_9114HG =25; |
|||
public const ushort PCI_9118DG =26; |
|||
public const ushort PCI_9118HG =27; |
|||
public const ushort PCI_9118HR =28; |
|||
public const ushort PCI_9810 =29; |
|||
public const ushort PCI_9812 =30; |
|||
public const ushort PCI_7396 =31; |
|||
public const ushort PCI_9116 =32; |
|||
public const ushort PCI_7256 =33; |
|||
public const ushort PCI_7258 =34; |
|||
public const ushort PCI_7260 =35; |
|||
public const ushort PCI_7452 =36; |
|||
public const ushort PCI_7442 =37; |
|||
|
|||
public const ushort MAX_CARD =32; |
|||
|
|||
//Error Number
|
|||
public const short NoError =0; |
|||
public const short ErrorUnknownCardType =-1; |
|||
public const short ErrorInvalidCardNumber =-2; |
|||
public const short ErrorTooManyCardRegistered =-3; |
|||
public const short ErrorCardNotRegistered =-4; |
|||
public const short ErrorFuncNotSupport =-5; |
|||
public const short ErrorInvalidIoChannel =-6; |
|||
public const short ErrorInvalidAdRange =-7; |
|||
public const short ErrorContIoNotAllowed =-8; |
|||
public const short ErrorDiffRangeNotSupport =-9; |
|||
public const short ErrorLastChannelNotZero =-10; |
|||
public const short ErrorChannelNotDescending =-11; |
|||
public const short ErrorChannelNotAscending =-12; |
|||
public const short ErrorOpenDriverFailed =-13; |
|||
public const short ErrorOpenEventFailed =-14; |
|||
public const short ErrorTransferCountTooLarge =-15; |
|||
public const short ErrorNotDoubleBufferMode =-16; |
|||
public const short ErrorInvalidSampleRate =-17; |
|||
public const short ErrorInvalidCounterMode =-18; |
|||
public const short ErrorInvalidCounter =-19; |
|||
public const short ErrorInvalidCounterState =-20; |
|||
public const short ErrorInvalidBinBcdParam =-21; |
|||
public const short ErrorBadCardType =-22; |
|||
public const short ErrorInvalidDaRefVoltage =-23; |
|||
public const short ErrorAdTimeOut =-24; |
|||
public const short ErrorNoAsyncAI =-25; |
|||
public const short ErrorNoAsyncAO =-26; |
|||
public const short ErrorNoAsyncDI =-27; |
|||
public const short ErrorNoAsyncDO =-28; |
|||
public const short ErrorNotInputPort =-29; |
|||
public const short ErrorNotOutputPort =-30; |
|||
public const short ErrorInvalidDioPort =-31; |
|||
public const short ErrorInvalidDioLine =-32; |
|||
public const short ErrorContIoActive =-33; |
|||
public const short ErrorDblBufModeNotAllowed =-34; |
|||
public const short ErrorConfigFailed =-35; |
|||
public const short ErrorInvalidPortDirection =-36; |
|||
public const short ErrorBeginThreadError =-37; |
|||
public const short ErrorInvalidPortWidth =-38; |
|||
public const short ErrorInvalidCtrSource =-39; |
|||
public const short ErrorOpenFile =-40; |
|||
public const short ErrorAllocateMemory =-41; |
|||
public const short ErrorDaVoltageOutOfRange =-42; |
|||
public const short ErrorDaExtRefNotAllowed =-43; |
|||
public const short ErrorDIODataWidthError =-44; |
|||
public const short ErrorTaskCodeError =-45; |
|||
public const short ErrortriggercountError =-46; |
|||
public const short ErrorInvalidTriggerMode =-47; |
|||
public const short ErrorInvalidTriggerType =-48; |
|||
public const short ErrorInvalidCounterValue =-50; |
|||
public const short ErrorInvalidEventHandle =-60; |
|||
public const short ErrorNoMessageAvailable =-61; |
|||
public const short ErrorEventMessgaeNotAdded =-62; |
|||
//Error number for driver API
|
|||
public const short ErrorConfigIoctl =-201; |
|||
public const short ErrorAsyncSetIoctl =-202; |
|||
public const short ErrorDBSetIoctl =-203; |
|||
public const short ErrorDBHalfReadyIoctl =-204; |
|||
public const short ErrorContOPIoctl =-205; |
|||
public const short ErrorContStatusIoctl =-206; |
|||
public const short ErrorPIOIoctl =-207; |
|||
public const short ErrorDIntSetIoctl =-208; |
|||
public const short ErrorWaitEvtIoctl =-209; |
|||
public const short ErrorOpenEvtIoctl =-210; |
|||
public const short ErrorCOSIntSetIoctl =-211; |
|||
public const short ErrorMemMapIoctl =-212; |
|||
public const short ErrorMemUMapSetIoctl =-213; |
|||
public const short ErrorCTRIoctl =-214; |
|||
public const short ErrorGetResIoctl =-215; |
|||
|
|||
//Synchronous Mode
|
|||
public const ushort SYNCH_OP =1; |
|||
public const ushort ASYNCH_OP =2; |
|||
|
|||
//AD Range
|
|||
public const ushort AD_B_10_V =1; |
|||
public const ushort AD_B_5_V =2; |
|||
public const ushort AD_B_2_5_V =3; |
|||
public const ushort AD_B_1_25_V =4; |
|||
public const ushort AD_B_0_625_V =5; |
|||
public const ushort AD_B_0_3125_V =6; |
|||
public const ushort AD_B_0_5_V =7; |
|||
public const ushort AD_B_0_05_V =8; |
|||
public const ushort AD_B_0_005_V =9; |
|||
public const ushort AD_B_1_V =10; |
|||
public const ushort AD_B_0_1_V =11; |
|||
public const ushort AD_B_0_01_V =12; |
|||
public const ushort AD_B_0_001_V =13; |
|||
public const ushort AD_U_20_V =14; |
|||
public const ushort AD_U_10_V =15; |
|||
public const ushort AD_U_5_V =16; |
|||
public const ushort AD_U_2_5_V =17; |
|||
public const ushort AD_U_1_25_V =18; |
|||
public const ushort AD_U_1_V =19; |
|||
public const ushort AD_U_0_1_V =20; |
|||
public const ushort AD_U_0_01_V =21; |
|||
public const ushort AD_U_0_001_V =22; |
|||
|
|||
//Clock Mode
|
|||
public const ushort TRIG_SOFTWARE =0; |
|||
public const ushort TRIG_INT_PACER =1; |
|||
public const ushort TRIG_EXT_STROBE =2; |
|||
public const ushort TRIG_HANDSHAKE =3; |
|||
public const ushort TRIG_CLK_10MHZ =4; //PCI-7300A
|
|||
public const ushort TRIG_CLK_20MHZ =5; //PCI-7300A
|
|||
public const ushort TRIG_DO_CLK_TIMER_ACK =6; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_10M_ACK =7; //PCI-7300A Rev. B
|
|||
public const ushort TRIG_DO_CLK_20M_ACK =8; //PCI-7300A Rev. B
|
|||
//Virtual Sampling Rate for using external clock as the clock source
|
|||
public const double CLKSRC_EXT_SampRate =10000; |
|||
|
|||
//-------- Constants for PCI-6208A/PCI-6308A/PCI-6308V -------------------
|
|||
//Output Mode
|
|||
public const ushort P6208_CURRENT_0_20MA =0; |
|||
public const ushort P6208_CURRENT_4_20MA =3; |
|||
public const ushort P6208_CURRENT_5_25MA =1; |
|||
public const ushort P6308_CURRENT_0_20MA =0; |
|||
public const ushort P6308_CURRENT_4_20MA =3; |
|||
public const ushort P6308_CURRENT_5_25MA =1; |
|||
//AO Setting
|
|||
public const ushort P6308V_AO_CH0_3 =0; |
|||
public const ushort P6308V_AO_CH4_7 =1; |
|||
public const ushort P6308V_AO_UNIPOLAR =0; |
|||
public const ushort P6308V_AO_BIPOLAR =1; |
|||
//-------- Constants for PCI-7200 --------------------
|
|||
//InputMode
|
|||
public const ushort DI_WAITING =0x02; |
|||
public const ushort DI_NOWAITING =0x00; |
|||
|
|||
public const ushort DI_TRIG_RISING =0x04; |
|||
public const ushort DI_TRIG_FALLING =0x00; |
|||
|
|||
public const ushort IREQ_RISING =0x08; |
|||
public const ushort IREQ_FALLING =0x00; |
|||
|
|||
//Output Mode
|
|||
public const ushort OREQ_ENABLE =0x10; |
|||
public const ushort OREQ_DISABLE =0x00; |
|||
|
|||
public const ushort OTRIG_HIGH =0x20; |
|||
public const ushort OTRIG_LOW =0x00; |
|||
|
|||
//-------- Constants for PCI-7248/7296/7396/7442 ---------------
|
|||
//DIO Port Direction
|
|||
public const ushort INPUT_PORT = 1; |
|||
public const ushort OUTPUT_PORT = 2; |
|||
//DIO Line Direction
|
|||
public const ushort INPUT_LINE = 1; |
|||
public const ushort OUTPUT_LINE = 2; |
|||
|
|||
//Channel & Port
|
|||
public const ushort Channel_P1A =0; |
|||
public const ushort Channel_P1B =1; |
|||
public const ushort Channel_P1C =2; |
|||
public const ushort Channel_P1CL =3; |
|||
public const ushort Channel_P1CH =4; |
|||
public const ushort Channel_P1AE =10; |
|||
public const ushort Channel_P1BE =11; |
|||
public const ushort Channel_P1CE =12; |
|||
public const ushort Channel_P2A =5; |
|||
public const ushort Channel_P2B =6; |
|||
public const ushort Channel_P2C =7; |
|||
public const ushort Channel_P2CL =8; |
|||
public const ushort Channel_P2CH =9; |
|||
public const ushort Channel_P2AE =15; |
|||
public const ushort Channel_P2BE =16; |
|||
public const ushort Channel_P2CE =17; |
|||
public const ushort Channel_P3A =10; |
|||
public const ushort Channel_P3B =11; |
|||
public const ushort Channel_P3C =12; |
|||
public const ushort Channel_P3CL =13; |
|||
public const ushort Channel_P3CH =14; |
|||
public const ushort Channel_P4A =15; |
|||
public const ushort Channel_P4B =16; |
|||
public const ushort Channel_P4C =17; |
|||
public const ushort Channel_P4CL =18; |
|||
public const ushort Channel_P4CH =19; |
|||
public const ushort Channel_P5A =20; |
|||
public const ushort Channel_P5B =21; |
|||
public const ushort Channel_P5C =22; |
|||
public const ushort Channel_P5CL =23; |
|||
public const ushort Channel_P5CH =24; |
|||
public const ushort Channel_P6A =25; |
|||
public const ushort Channel_P6B =26; |
|||
public const ushort Channel_P6C =27; |
|||
public const ushort Channel_P6CL =28; |
|||
public const ushort Channel_P6CH =29; |
|||
//the following are used for PCI7396
|
|||
public const ushort Channel_P1 =30; |
|||
public const ushort Channel_P2 =31; |
|||
public const ushort Channel_P3 =32; |
|||
public const ushort Channel_P4 =33; |
|||
public const ushort Channel_P1E =34; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P2E =35; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P3E =36; //only used by DIO_PortConfig function
|
|||
public const ushort Channel_P4E =37; //only used by DIO_PortConfig function
|
|||
//7442
|
|||
public const ushort P7442_CH0 = 0; |
|||
public const ushort P7442_CH1 = 1; |
|||
public const ushort P7442_TTL0 = 2; |
|||
public const ushort P7442_TTL1 = 3; |
|||
//-------- Constants for PCI-7300A -------------------
|
|||
//Wait Status
|
|||
public const ushort P7300_WAIT_NO =0; |
|||
public const ushort P7300_WAIT_TRG =1; |
|||
public const ushort P7300_WAIT_FIFO =2; |
|||
public const ushort P7300_WAIT_BOTH =3; |
|||
|
|||
//Terminator control
|
|||
public const ushort P7300_TERM_OFF =0; |
|||
public const ushort P7300_TERM_ON =1; |
|||
|
|||
//DI control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DIREQ_POS =0x00000000; |
|||
public const ushort P7300_DIREQ_NEG =0x00000001; |
|||
public const ushort P7300_DIACK_POS =0x00000000; |
|||
public const ushort P7300_DIACK_NEG =0x00000002; |
|||
public const ushort P7300_DITRIG_POS =0x00000000; |
|||
public const ushort P7300_DITRIG_NEG =0x00000004; |
|||
|
|||
//DO control signals polarity for PCI-7300A Rev. B
|
|||
public const ushort P7300_DOREQ_POS =0x00000000; |
|||
public const ushort P7300_DOREQ_NEG =0x00000008; |
|||
public const ushort P7300_DOACK_POS =0x00000000; |
|||
public const ushort P7300_DOACK_NEG =0x00000010; |
|||
public const ushort P7300_DOTRIG_POS =0x00000000; |
|||
public const ushort P7300_DOTRIG_NEG =0x00000020; |
|||
//-------- Constants for PCI-7432/7433/7434 ---------------
|
|||
public const ushort PORT_DI_LOW =0; |
|||
public const ushort PORT_DI_HIGH =1; |
|||
public const ushort PORT_DO_LOW =0; |
|||
public const ushort PORT_DO_HIGH =1; |
|||
public const ushort P7432R_DO_LED =1; |
|||
public const ushort P7433R_DO_LED =0; |
|||
public const ushort P7434R_DO_LED =2; |
|||
public const ushort P7432R_DI_SLOT =1; |
|||
public const ushort P7433R_DI_SLOT =2; |
|||
public const ushort P7434R_DI_SLOT =0; |
|||
//-- Dual-Interrupt Source control for PCI-7248/96 & 7432/33 & 7230 & 8554 & 7396 &7256 &7260 ---
|
|||
public const short INT1_DISABLE =-1; //INT1 Disabled
|
|||
public const short INT1_COS =0; //INT1 COS : only available for PCI-7396, PCI-7256, PCI-7260
|
|||
public const short INT1_FP1C0 =1; //INT1 by Falling edge of P1C0 : only available for PCI7248/96/7396
|
|||
public const short INT1_RP1C0_FP1C3 =2; //INT1 by P1C0 Rising or P1C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT1_EVENT_COUNTER =3; //INT1 by Event Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT1_EXT_SIGNAL =1; //INT1 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT1_COUT12 =1; //INT1 COUT12 : only available for PCI8554
|
|||
public const short INT1_CH0 =1; //INT1 CH0 : only available for PCI7256, PCI7260
|
|||
public const short INT1_COS0 =1; //INT1 COS0 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS1 =2; //INT1 COS1 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS2 =4; //INT1 COS2 : only available for PCI-7452/PCI-7442
|
|||
public const short INT1_COS3 =8; //INT1 COS3 : only available for PCI-7452/PCI-7442
|
|||
public const short INT2_DISABLE =-1; //INT2 Disabled
|
|||
public const short INT2_COS =0; //INT2 COS : only available for PCI-7396
|
|||
public const short INT2_FP2C0 =1; //INT2 by Falling edge of P2C0 : only available for PCI7248/96/7396
|
|||
public const short INT2_RP2C0_FP2C3 =2; //INT2 by P2C0 Rising or P2C3 Falling : only available for PCI7248/96/7396
|
|||
public const short INT2_TIMER_COUNTER =3; //INT2 by Timer Counter down to zero : only available for PCI7248/96/7396
|
|||
public const short INT2_EXT_SIGNAL =1; //INT2 by external signal : only available for PCI7432/7433/7230/8554
|
|||
public const short INT2_CH1 =2; //INT2 CH1 : only available for PCI7256, PCI7260
|
|||
public const short INT2_WDT =4; //INT2 by WDT
|
|||
|
|||
public const ushort ManualResetIEvt =0x4000;//interrupt event is manually reset by user
|
|||
public const ushort WDT_OVRFLOW_SAFETYOUT =0x8000;// enable safteyout while WDT overflow
|
|||
//-------- Constants for PCI-8554 --------------------
|
|||
//Clock Source of Cunter N
|
|||
public const ushort ECKN =0; |
|||
public const ushort COUTN_1 =1; |
|||
public const ushort CK1 =2; |
|||
public const ushort COUT10 =3; |
|||
|
|||
//Clock Source of CK1
|
|||
public const ushort CK1_C8M =0; |
|||
public const ushort CK1_COUT11 =1; |
|||
|
|||
//Debounce Clock
|
|||
public const ushort DBCLK_COUT11 =0; |
|||
public const ushort DBCLK_2MHZ =1; |
|||
|
|||
//-------- Constants for PCI-9111 --------------------
|
|||
//Dual Interrupt Mode
|
|||
public const ushort P9111_INT1_EOC =0; //Ending of AD conversion
|
|||
public const ushort P9111_INT1_FIFO_HF =1; //FIFO Half Full
|
|||
public const ushort P9111_INT2_PACER =0; //Every Timer tick
|
|||
public const ushort P9111_INT2_EXT_TRG =1; //ExtTrig High->Low
|
|||
|
|||
//Channel Count
|
|||
public const ushort P9111_CHANNEL_DO =0; |
|||
public const ushort P9111_CHANNEL_EDO =1; |
|||
public const ushort P9111_CHANNEL_DI =0; |
|||
public const ushort P9111_CHANNEL_EDI =1; |
|||
|
|||
//EDO function
|
|||
public const ushort P9111_EDO_INPUT =1; //EDO port set as Input port
|
|||
public const ushort P9111_EDO_OUT_EDO =2; //EDO port set as Output port
|
|||
public const ushort P9111_EDO_OUT_CHN =3; //EDO port set as channel number ouput port
|
|||
|
|||
//Trigger Mode
|
|||
public const ushort P9111_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9111_TRGMOD_PRE =0x01; //Pre-Trigger Mode
|
|||
public const ushort P9111_TRGMOD_POST =0x02; //Post Trigger Mode
|
|||
|
|||
//AO Setting
|
|||
public const ushort P9111_AO_UNIPOLAR =0; |
|||
public const ushort P9111_AO_BIPOLAR =1; |
|||
|
|||
//-------- Constants for PCI-9118 --------------------
|
|||
public const ushort P9118_AI_BiPolar =0x00; |
|||
public const ushort P9118_AI_UniPolar =0x01; |
|||
|
|||
public const ushort P9118_AI_SingEnded =0x00; |
|||
public const ushort P9118_AI_Differential =0x02; |
|||
|
|||
public const ushort P9118_AI_ExtG =0x04; |
|||
|
|||
public const ushort P9118_AI_ExtTrig =0x08; |
|||
|
|||
public const ushort P9118_AI_DtrgNegative =0x00; |
|||
public const ushort P9118_AI_DtrgPositive =0x10; |
|||
|
|||
public const ushort P9118_AI_EtrgNegative =0x00; |
|||
public const ushort P9118_AI_EtrgPositive =0x20; |
|||
|
|||
public const ushort P9118_AI_BurstModeEn =0x40; |
|||
public const ushort P9118_AI_SampleHold =0x80; |
|||
public const ushort P9118_AI_PostTrgEn =0x100; |
|||
public const ushort P9118_AI_AboutTrgEn =0x200; |
|||
|
|||
//-------- Constants for PCI-9116 --------------------
|
|||
public const ushort P9116_AI_LocalGND =0x00; |
|||
public const ushort P9116_AI_UserCMMD =0x01; |
|||
public const ushort P9116_AI_SingEnded =0x00; |
|||
public const ushort P9116_AI_Differential =0x02; |
|||
public const ushort P9116_AI_BiPolar =0x00; |
|||
public const ushort P9116_AI_UniPolar =0x04; |
|||
|
|||
public const ushort P9116_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9116_TRGMOD_POST =0x10; //Post Trigger Mode
|
|||
public const ushort P9116_TRGMOD_DELAY =0x20; //Delay Trigger Mode
|
|||
public const ushort P9116_TRGMOD_PRE =0x30; //Pre-Trigger Mode
|
|||
public const ushort P9116_TRGMOD_MIDL =0x40; //Middle Trigger Mode
|
|||
public const ushort P9116_AI_TrgPositive =0x00; |
|||
public const ushort P9116_AI_TrgNegative =0x80; |
|||
public const ushort P9116_AI_ExtTimeBase =0x100; |
|||
public const ushort P9116_AI_IntTimeBase =0x000; |
|||
public const ushort P9116_AI_DlyInSamples =0x200; |
|||
public const ushort P9116_AI_DlyInTimebase =0x000; |
|||
public const ushort P9116_AI_ReTrigEn =0x400; |
|||
public const ushort P9116_AI_MCounterEn =0x800; |
|||
public const ushort P9116_AI_SoftPolling =0x0000; |
|||
public const ushort P9116_AI_INT =0x1000; |
|||
public const ushort P9116_AI_DMA =0x2000; |
|||
|
|||
//-------- Constants for PCI-9812 --------------------
|
|||
//Trigger Mode
|
|||
public const ushort P9812_TRGMOD_SOFT =0x00; //Software Trigger Mode
|
|||
public const ushort P9812_TRGMOD_POST =0x01; //Post Trigger Mode
|
|||
public const ushort P9812_TRGMOD_PRE =0x02; //Pre-Trigger Mode
|
|||
public const ushort P9812_TRGMOD_DELAY =0x03; //Delay Trigger Mode
|
|||
public const ushort P9812_TRGMOD_MIDL =0x04; //Middle Trigger Mode
|
|||
|
|||
public const ushort P9812_AIEvent_Manual =0x08; //Middle Trigger Mode
|
|||
|
|||
//Trigger Source
|
|||
public const ushort P9812_TRGSRC_CH0 =0x00; //trigger source --CH0
|
|||
public const ushort P9812_TRGSRC_CH1 =0x08; //trigger source --CH1
|
|||
public const ushort P9812_TRGSRC_CH2 =0x10; //trigger source --CH2
|
|||
public const ushort P9812_TRGSRC_CH3 =0x18; //trigger source --CH3
|
|||
public const ushort P9812_TRGSRC_EXT_DIG =0x20; //External Digital Trigger
|
|||
|
|||
//Trigger Polarity
|
|||
public const ushort P9812_TRGSLP_POS =0x00; //Positive slope trigger
|
|||
public const ushort P9812_TRGSLP_NEG =0x40; //Negative slope trigger
|
|||
|
|||
//Frequency Selection
|
|||
public const ushort P9812_AD2_GT_PCI =0x80; //Freq. of A/D clock > PCI clock freq.
|
|||
public const ushort P9812_AD2_LT_PCI =0x00; //Freq. of A/D clock < PCI clock freq.
|
|||
|
|||
//Clock Source
|
|||
public const ushort P9812_CLKSRC_INT =0x000; //Internal clock
|
|||
public const ushort P9812_CLKSRC_EXT_SIN =0x100; //External SIN wave clock
|
|||
public const ushort P9812_CLKSRC_EXT_DIG =0x200; //External Square wave clock
|
|||
|
|||
//EMG shdn ctrl code
|
|||
public const ushort EMGSHDN_OFF =0; //off
|
|||
public const ushort EMGSHDN_ON =1; //on
|
|||
public const ushort EMGSHDN_RECOVERY =2; //recovery
|
|||
|
|||
//Hot Reset Hold ctrl code
|
|||
public const ushort HRH_OFF =0; //off
|
|||
public const ushort HRH_ON =1; //on
|
|||
|
|||
//-------- Timer/Counter -----------------------------
|
|||
//Counter Mode (8254)
|
|||
public const ushort TOGGLE_OUTPUT =0; //Toggle output from low to high on terminal count
|
|||
public const ushort PROG_ONE_SHOT =1; //Programmable one-shot
|
|||
public const ushort RATE_GENERATOR =2; //Rate generator
|
|||
public const ushort SQ_WAVE_RATE_GENERATOR =3; //Square wave rate generator
|
|||
public const ushort SOFT_TRIG =4; //Software-triggered strobe
|
|||
public const ushort HARD_TRIG =5; //Hardware-triggered strobe
|
|||
|
|||
//General Purpose Timer/Counter
|
|||
//Counter Mode
|
|||
public const ushort General_Counter =0x00; //general counter
|
|||
public const ushort Pulse_Generation =0x01; //pulse generation
|
|||
//GPTC clock source
|
|||
public const ushort GPTC_CLKSRC_EXT =0x08; |
|||
public const ushort GPTC_CLKSRC_INT =0x00; |
|||
public const ushort GPTC_GATESRC_EXT =0x10; |
|||
public const ushort GPTC_GATESRC_INT =0x00; |
|||
public const ushort GPTC_UPDOWN_SELECT_EXT =0x20; |
|||
public const ushort GPTC_UPDOWN_SELECT_SOFT =0x00; |
|||
public const ushort GPTC_UP_CTR =0x40; |
|||
public const ushort GPTC_DOWN_CTR =0x00; |
|||
public const ushort GPTC_ENABLE =0x80; |
|||
public const ushort GPTC_DISABLE =0x00; |
|||
|
|||
//Watchdog Timer
|
|||
//Counter action
|
|||
public const ushort WDT_DISARM =0; |
|||
public const ushort WDT_ARM =1; |
|||
public const ushort WDT_RESTART =2; |
|||
|
|||
//Pattern ID
|
|||
public const ushort INIT_PTN =0; |
|||
public const ushort EMGSHDN_PTN =1; |
|||
|
|||
//16-bit binary or 4-decade BCD counter
|
|||
public const ushort BIN =0; |
|||
public const ushort BCD =1; |
|||
|
|||
//Pattern ID for 7442
|
|||
public const ushort INIT_PTN_CH0 = 0; |
|||
public const ushort INIT_PTN_CH1 =1; |
|||
public const ushort SAFTOUT_PTN_CH0 =4; |
|||
public const ushort SAFTOUT_PTN_CH1 =5; |
|||
|
|||
//DAQ Event type for the event message
|
|||
public const ushort AIEnd =0; |
|||
public const ushort DIEnd =0; |
|||
public const ushort DOEnd =0; |
|||
public const ushort DBEvent =1; |
|||
|
|||
public const ushort RegBySlot=0x8000; |
|||
|
|||
/*------------------------------------------------------------------ |
|||
** PCIS-DASK Function prototype |
|||
------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Register_Card (ushort CardType, ushort card_num); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short Release_Card (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetActualRate (ushort CardNumber, double fSampleRate, out double fActualRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownControl (ushort CardNumber, byte ctrl); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EMGShutDownStatus (ushort CardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldControl(ushort wCardNumber, byte enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short HotResetHoldStatus(ushort wCardNumber, out byte sts); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetInitPattern (ushort CardNumber, byte patID, out uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short SetInitPattern(ushort wCardNumber, byte patID, uint pattern); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short IdentifyLED_Control (ushort CardNumber, byte ctrl); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9111_Config (ushort CardNumber, ushort TrigSource, ushort TrgMode, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9112_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9113_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_Config (ushort CardNumber, ushort TrigSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_Config (ushort CardNumber, ushort ConfigCtrl, ushort TrigCtrl, ushort PostCnt, ushort MCnt, ushort ReTrgCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9118_Config (ushort CardNumber, ushort ModeCtrl, ushort FunCtrl, ushort BurstCnt, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_Config (ushort CardNumber, ushort TrgMode, ushort TrgSrc, ushort TrgPol, ushort ClkSel, ushort TrgLevel, ushort PostCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9812_SetDiv (ushort wCardNumber, uint PacerVal); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9114_PreTrigConfig (ushort CardNumber, ushort PreTrgEn, ushort TraceCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_9116_CounterInterval (ushort wCardNumber, uint ScanIntrv, uint SampIntrv); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_VoltScale (ushort CardNumber, ushort AdRange, ushort reading, out double voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannel (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannels (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, ushort[] Buffer, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannels (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
ushort[] Buffer, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadChannelToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContReadMultiChannelsToFile (ushort CardNumber, ushort NumChans, ushort[] Chans, |
|||
ushort[] AdRanges, string[] FileName, uint ReadCount, |
|||
double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContScanChannelsToFile (ushort CardNumber, ushort Channel, ushort AdRange, |
|||
string FileName, uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_ContVScale (ushort wCardNumber, ushort adRange, ushort[] readingArray, double[] voltageArray, int count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady, out byte StopFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferTransfer (ushort CardNumber, ushort[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_EventCallBack(ushort CardNumber, ushort mode, ushort EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6208A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308A_Config (ushort CardNumber, ushort V2AMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_6308V_Config (ushort wCardNumber, ushort Channel, ushort wOutputPolarity, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9111_Config (ushort CardNumber, ushort OutputPolarity); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_9112_Config (ushort CardNumber, ushort Channel, double refVoltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_WriteChannel (ushort CardNumber, ushort Channel, short Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VWriteChannel (ushort CardNumber, ushort Channel, double Voltage); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_VoltScale (ushort CardNumber, ushort Channel, double Voltage, out short binValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuWriteChannel (ushort wCardNumber, ushort wGroup, short[] pwBuffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_SimuVWriteChannel (ushort wCardNumber, ushort wGroup, double[] VBuffer); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7200_Config (ushort CardNumber, ushort TrigSource, ushort ExtTrigEn, ushort TrigPol, ushort I_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_REQ_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort I_Cntrl_Pol, bool clear_fifo, bool disable_di); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_InitialMemoryAllocated (ushort CardNumber, out uint DmaSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPort(ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContReadPortToFile (ushort CardNumber, ushort Port, string FileName, |
|||
uint ReadCount, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncCheck (ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferHalfReady(ushort CardNumber, out byte HalfReady); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferMode (ushort CardNumber, bool Enable); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, byte[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer (ushort CardNumber, short[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferTransfer(ushort CardNumber, uint[] Buffer); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, byte[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup (ushort wCardNumber, short[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferSetup(ushort wCardNumber, uint[] pwBuffer, uint dwReadCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_AsyncDblBufferOverrun (ushort CardNumber, ushort op, out ushort overrunFlag); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7200_Config (ushort CardNumber, ushort TrigSource, ushort OutReqEn, ushort OutTrigSig); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300A_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_REQ_Pol); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_7300B_Config (ushort CardNumber, ushort PortWidth, ushort TrigSource, ushort WaitStatus, ushort Terminator, ushort O_Cntrl_Pol, uint FifoThreshold); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_InitialMemoryAllocated (ushort CardNumber, out uint MemSize); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteLine (ushort CardNumber, ushort Port, ushort Line, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, byte Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort (ushort CardNumber, ushort Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WritePort(ushort CardNumber, uint Port, uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_WriteExtTrigLine (ushort CardNumber, ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadLine (ushort CardNumber, ushort Port, ushort Line, out ushort Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ReadPort (ushort CardNumber, ushort Port, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, byte[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, ushort[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContWritePort (ushort CardNumber, ushort Port, uint[] Buffer, |
|||
uint WriteCount, ushort Iterations, double SampleRate, ushort SyncMode); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, byte[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart (ushort CardNumber, short[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStart(ushort CardNumber, uint[] Buffer, uint WriteCount, double SampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_PGStop (ushort CardNumber); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContStatus (ushort CardNumber, out ushort Status); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncCheck(ushort CardNumber, out byte Stopped, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncClear (ushort CardNumber, out uint AccessCnt); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short EDO_9111_Config (ushort CardNumber, ushort EDO_Fun); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, byte[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup (ushort CardNumber, short[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferSetup(ushort CardNumber, uint[] pwBuffer, uint dwWriteCount, out ushort BufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_AsyncMultiBufferNextReady(ushort CardNumber, out byte bNextReady, out ushort wBufferId); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_ContMultiBufferStart (ushort wCardNumber, ushort wPort, double fSampleRate); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_EventCallBack(ushort CardNumber, short mode, short EventType, MulticastDelegate callbackAddr); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_PortConfig (ushort CardNumber, ushort Port, ushort Direction); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LinesConfig(ushort wCardNumber, ushort wPort, ushort wLinesdirmap); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_LineConfig(ushort wCardNumber, ushort wPort, ushort wLine, ushort wDirection); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetDualInterrupt (ushort CardNumber, short Int1Mode, short Int2Mode, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt (ushort CardNumber, ushort Port, ushort ctlA, ushort ctlB, ushort ctlC); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT1_EventMessage(ushort CardNumber, short Int1Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_INT2_EventMessage(ushort CardNumber, short Int2Mode, long windowHandle, long message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_7300SetInterrupt (ushort CardNumber, short AuxDIEn, short T2En, long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_AUXDI_EventMessage(ushort CardNumber, short AuxDIEn, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_T2_EventMessage(ushort CardNumber, short T2En, long windowHandle, uint message, MulticastDelegate callbackAddr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchData(ushort wCardNumber, out ushort CosLData); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_SetCOSInterrupt32(ushort wCardNumber, byte Port, uint ctl, out long hEvent, bool bManualReset); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DIO_GetCOSLatchDataInt32(ushort wCardNumber, byte Port, out uint CosLData); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Setup (ushort CardNumber, ushort Ctr, ushort Mode, uint Count, ushort BinBcd); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Clear (ushort CardNumber, ushort Ctr, ushort State); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Read (ushort CardNumber, ushort Ctr, out uint Value); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_Update (ushort CardNumber, ushort Ctr, uint Count); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_ClkSrc_Config (ushort CardNumber, ushort Ctr, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_CK1_Config (ushort CardNumber, ushort ClockSource); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short CTR_8554_Debounce_Config (ushort CardNumber, ushort DebounceClock); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Setup (ushort wCardNumber, ushort wGCtr, ushort wGCtrCtrl,uint dwCount); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Clear (ushort wCardNumber, ushort wGCtr); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GCTR_Read (ushort wCardNumber, ushort wGCtr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Setup (ushort CardNumber, ushort wCtr, float ovflowSec, out float actualSec, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Control (ushort wCardNumber, ushort wCtr, ushort action); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Status (ushort wCardNumber, ushort Ctr, out uint pValue); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short WDT_Reload(ushort wCardNumber, float ovflowSec, out float actualSec); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetEvent(ushort wCardNumber, out long hEvent); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetEvent(ushort wCardNumber, out long hEvent); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short AI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DI_GetView(ushort wCardNumber, uint[] pView); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short DO_GetView(ushort wCardNumber, uint[] pView); |
|||
/*---------------------------------------------------------------------------*/ |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardType (ushort wCardNumber, out ushort cardType); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetCardIndexFromID (ushort wCardNumber, out ushort cardType, out ushort cardIndex); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetBaseAddr(ushort wCardNumber, uint[] BaseAddr, uint[] BaseAddr2); |
|||
[DllImport("PCI-Dask.dll")] |
|||
public static extern short GetLCRAddr(ushort wCardNumber, uint[] LcrAddr); |
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
namespace D9112_AI_Single_Buffer_Check |
|||
{ |
|||
partial class Form1 |
|||
{ |
|||
/// <summary>
|
|||
/// 設計工具所需的變數。
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// 清除任何使用中的資源。
|
|||
/// </summary>
|
|||
/// <param name="disposing">如果應該公開 Managed 資源則為 true,否則為 false。</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form 設計工具產生的程式碼
|
|||
|
|||
/// <summary>
|
|||
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
|
|||
///
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.axDGraph1 = new AxDBGRAPHLib.AxDGraph(); |
|||
((System.ComponentModel.ISupportInitialize)(this.axDGraph1)).BeginInit(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Location = new System.Drawing.Point(99, 242); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(90, 30); |
|||
this.button1.TabIndex = 1; |
|||
this.button1.Text = "Start"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// axDGraph1
|
|||
//
|
|||
this.axDGraph1.Enabled = true; |
|||
this.axDGraph1.Location = new System.Drawing.Point(2, 0); |
|||
this.axDGraph1.Name = "axDGraph1"; |
|||
this.axDGraph1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axDGraph1.OcxState"))); |
|||
this.axDGraph1.Size = new System.Drawing.Size(287, 236); |
|||
this.axDGraph1.TabIndex = 2; |
|||
//
|
|||
// Form1
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(292, 273); |
|||
this.Controls.Add(this.axDGraph1); |
|||
this.Controls.Add(this.button1); |
|||
this.Name = "Form1"; |
|||
this.Text = "Form1"; |
|||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); |
|||
this.Load += new System.EventHandler(this.Form1_Load); |
|||
((System.ComponentModel.ISupportInitialize)(this.axDGraph1)).EndInit(); |
|||
this.ResumeLayout(false); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Button button1; |
|||
private AxDBGRAPHLib.AxDGraph axDGraph1; |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,75 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Text; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D9112_AI_Single_Buffer_Check |
|||
{ |
|||
public partial class Form1 : Form |
|||
{ |
|||
ushort[] data_buffer = new ushort[1000]; |
|||
double[] voltage_array = new double[1000]; |
|||
public short m_dev; |
|||
public Form1() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Form1_Load(object sender, EventArgs e) |
|||
{ |
|||
m_dev = DASK.Register_Card(DASK.PCI_9112, 0); |
|||
if (m_dev < 0) |
|||
{ |
|||
MessageBox.Show("Register_Card error!"); |
|||
|
|||
} |
|||
} |
|||
|
|||
private void Form1_FormClosing(object sender, FormClosingEventArgs e) |
|||
{ |
|||
short ret; |
|||
if (m_dev >= 0) |
|||
{ |
|||
ret = DASK.Release_Card((ushort)m_dev); |
|||
} |
|||
} |
|||
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
short ret; |
|||
byte stopped; |
|||
uint access_cnt; |
|||
ret = DASK.AI_9112_Config((ushort)m_dev, DASK.TRIG_INT_PACER); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_9112_Config error!"); |
|||
return; |
|||
} |
|||
ret = DASK.AI_ContReadChannel((ushort)m_dev, 0, DASK.AD_B_5_V, data_buffer, 1000, 10000, DASK.ASYNCH_OP); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_ContReadChannel error!"); |
|||
return; |
|||
} |
|||
do |
|||
{ |
|||
ret = DASK.AI_AsyncCheck((ushort)m_dev, out stopped, out access_cnt); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_AsyncCheck error!"); |
|||
return; |
|||
} |
|||
} while (stopped == 0); |
|||
ret = DASK.AI_ContVScale((ushort)m_dev, DASK.AD_B_5_V, data_buffer, voltage_array, 1000); |
|||
if (ret < 0) |
|||
{ |
|||
MessageBox.Show("AI_ContVScale error!"); |
|||
return; |
|||
} |
|||
axDGraph1.PlotGraph(voltage_array, 0); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<data name="axDGraph1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value> |
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w |
|||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 |
|||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAcAIAAAIB |
|||
AAAAAQAAAAAZAAAAQ29weXJpZ2h0IChjKSAyMDAyIEFETGluawAAAABCAgAABAACAKodAABkGAAABwAA |
|||
AADU0MgAAANS4wuRj84RneMAqgBLuFEBiAAAvALcfAEACLdzstOp+sXpAAABAAAAAAAAAAAAAADoAwAA |
|||
AAAAAAAAAAAAAS4AABAAAAAFAAAAAAAAAAAAAAAAAAAAEAAAAAUAAAAAAAAAAAAAAAAAAAAQAAAABQAA |
|||
AAAAAAAAAAAAAAAAAAABAAEBAQAAAAAAAAAAAACAgIAAQEBAAAAAAAAAEAAAAAUAAAAbwh9sAAAAAAAA |
|||
JEAQAAAABQAAABvCH2wAAAAAAAAkwBAAAAAFAGkA8It+AAAAAAAA/q9AEAAAAAUAaQDwi34AAAAAAAAA |
|||
AAABLgAAAAAQAAAABQAAAAAAAAAAAAAAAAAAABAAAAAFAAAAAAAAAAAAAAAAAAAAEAAAAAUAAAAAAAAA |
|||
AAAAAAAAAAABAAEAAQEAAAAAAAAAAAAAgICAAEBAQAAAAAAAGAAAAAAAAAAAAAEAAADoef8AAAD/AAAA |
|||
/wAAABgAAAAAAAAAAAABAAAA6Hn/gAAA/4AAAP+AAAAYAAAAAAAAAAAAAQAAAOh5//8AAP//AAD//wAA |
|||
GAAAAAAAAAAAAAEAAADoeQD/AAAA/wAAAP8AABgAAAAAAAAAAAABAAAA6HkA//8AAP//AAD//wAYAAAA |
|||
AAAAAAAAAQAAAOh5AAD/AAAA/wAAAP8AGAAAAAAAAAAAAAEAAADoef8A/wD/AP8A/wD/ABgAAAAAAAAA |
|||
AAABAAAA6HnAwMAAwMDAAMDAwAABAQAL |
|||
</value> |
|||
</data> |
|||
</root> |
|||
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Windows.Forms; |
|||
|
|||
namespace D9112_AI_Single_Buffer_Check |
|||
{ |
|||
static class Program |
|||
{ |
|||
/// <summary>
|
|||
/// 應用程式的主要進入點。
|
|||
/// </summary>
|
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Application.EnableVisualStyles(); |
|||
Application.SetCompatibleTextRenderingDefault(false); |
|||
Application.Run(new Form1()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 組件的一般資訊是由下列的屬性集控制。
|
|||
// 變更這些屬性的值即可修改組件的相關
|
|||
// 資訊。
|
|||
[assembly: AssemblyTitle("D9112_AI_Single_Buffer_Check")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("ADLINK")] |
|||
[assembly: AssemblyProduct("D9112_AI_Single_Buffer_Check")] |
|||
[assembly: AssemblyCopyright("Copyright (C) ADLINK 2006")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 將 ComVisible 設定為 false 會使得這個組件中的型別
|
|||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|||
// 的型別,請在該型別上將 ComVisible 屬性設定為 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|||
[assembly: Guid("b1902899-7b7d-4258-b421-97fad4069b2f")] |
|||
|
|||
// 組件的版本資訊是由下列四項值構成:
|
|||
//
|
|||
// 主要版本
|
|||
// 次要版本
|
|||
// 組建編號
|
|||
// 修訂編號
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 這段程式碼是由工具產生的。
|
|||
// 執行階段版本:2.0.50727.42
|
|||
//
|
|||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
|||
// 程式碼,這個檔案將會遺失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D9112_AI_Single_Buffer_Check.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 用於查詢當地語系化字串等的強型別資源類別
|
|||
/// </summary>
|
|||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
|||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
|||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
|||
// (利用 /str 選項),或重建您的 VS 專案。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D9112_AI_Single_Buffer_Check.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有
|
|||
/// 使用這個強型別資源類別的資源查閱。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:2.0.50727.42
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace D9112_AI_Single_Buffer_Check.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,20 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00 |
|||
# Visual Studio 2005 |
|||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "D6208_AO_OnePoint", "D6208_AO_OnePoint\D6208_AO_OnePoint.vbproj", "{43814036-5A5E-44BD-961E-820797A91AD6}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{43814036-5A5E-44BD-961E-820797A91AD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{43814036-5A5E-44BD-961E-820797A91AD6}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{43814036-5A5E-44BD-961E-820797A91AD6}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{43814036-5A5E-44BD-961E-820797A91AD6}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,109 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.50727</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{43814036-5A5E-44BD-961E-820797A91AD6}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<StartupObject>D6208_AO_OnePoint.My.MyApplication</StartupObject> |
|||
<RootNamespace>D6208_AO_OnePoint</RootNamespace> |
|||
<AssemblyName>D6208_AO_OnePoint</AssemblyName> |
|||
<MyType>WindowsForms</MyType> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<DefineDebug>true</DefineDebug> |
|||
<DefineTrace>true</DefineTrace> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DocumentationFile>D6208_AO_OnePoint.xml</DocumentationFile> |
|||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<DefineDebug>false</DefineDebug> |
|||
<DefineTrace>true</DefineTrace> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DocumentationFile>D6208_AO_OnePoint.xml</DocumentationFile> |
|||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Deployment" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Import Include="Microsoft.VisualBasic" /> |
|||
<Import Include="System" /> |
|||
<Import Include="System.Collections" /> |
|||
<Import Include="System.Collections.Generic" /> |
|||
<Import Include="System.Data" /> |
|||
<Import Include="System.Drawing" /> |
|||
<Import Include="System.Diagnostics" /> |
|||
<Import Include="System.Windows.Forms" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="DASK.vb" /> |
|||
<Compile Include="Form1.vb"> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="Form1.Designer.vb"> |
|||
<DependentUpon>Form1.vb</DependentUpon> |
|||
<SubType>Form</SubType> |
|||
</Compile> |
|||
<Compile Include="My Project\AssemblyInfo.vb" /> |
|||
<Compile Include="My Project\Application.Designer.vb"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Application.myapp</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="My Project\Resources.Designer.vb"> |
|||
<AutoGen>True</AutoGen> |
|||
<DesignTime>True</DesignTime> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="My Project\Settings.Designer.vb"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Form1.resx"> |
|||
<SubType>Designer</SubType> |
|||
<DependentUpon>Form1.vb</DependentUpon> |
|||
</EmbeddedResource> |
|||
<EmbeddedResource Include="My Project\Resources.resx"> |
|||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.vb</LastGenOutput> |
|||
<CustomToolNamespace>My.Resources</CustomToolNamespace> |
|||
<SubType>Designer</SubType> |
|||
</EmbeddedResource> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="My Project\Application.myapp"> |
|||
<Generator>MyApplicationCodeGenerator</Generator> |
|||
<LastGenOutput>Application.Designer.vb</LastGenOutput> |
|||
</None> |
|||
<None Include="My Project\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<CustomToolNamespace>My</CustomToolNamespace> |
|||
<LastGenOutput>Settings.Designer.vb</LastGenOutput> |
|||
</None> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,788 @@ |
|||
Option Strict Off |
|||
Option Explicit On |
|||
Module DASK |
|||
|
|||
'ADLink PCI Card Type |
|||
Public Const PCI_6208V As Short = 1 |
|||
Public Const PCI_6208A As Short = 2 |
|||
Public Const PCI_6308V As Short = 3 |
|||
Public Const PCI_6308A As Short = 4 |
|||
Public Const PCI_7200 As Short = 5 |
|||
Public Const PCI_7230 As Short = 6 |
|||
Public Const PCI_7233 As Short = 7 |
|||
Public Const PCI_7234 As Short = 8 |
|||
Public Const PCI_7248 As Short = 9 |
|||
Public Const PCI_7249 As Short = 10 |
|||
Public Const PCI_7250 As Short = 11 |
|||
Public Const PCI_7252 As Short = 12 |
|||
Public Const PCI_7296 As Short = 13 |
|||
Public Const PCI_7300A_RevA As Short = 14 |
|||
Public Const PCI_7300A_RevB As Short = 15 |
|||
Public Const PCI_7432 As Short = 16 |
|||
Public Const PCI_7433 As Short = 17 |
|||
Public Const PCI_7434 As Short = 18 |
|||
Public Const PCI_8554 As Short = 19 |
|||
Public Const PCI_9111DG As Short = 20 |
|||
Public Const PCI_9111HR As Short = 21 |
|||
Public Const PCI_9112 As Short = 22 |
|||
Public Const PCI_9113 As Short = 23 |
|||
Public Const PCI_9114DG As Short = 24 |
|||
Public Const PCI_9114HG As Short = 25 |
|||
Public Const PCI_9118DG As Short = 26 |
|||
Public Const PCI_9118HG As Short = 27 |
|||
Public Const PCI_9118HR As Short = 28 |
|||
Public Const PCI_9810 As Short = 29 |
|||
Public Const PCI_9812 As Short = 30 |
|||
Public Const PCI_7396 As Short = 31 |
|||
Public Const PCI_9116 As Short = 32 |
|||
Public Const PCI_7256 As Short = 33 |
|||
Public Const PCI_7258 As Short = 34 |
|||
Public Const PCI_7260 As Short = 35 |
|||
Public Const PCI_7452 As Short = 36 |
|||
Public Const PCI_7442 As Short = 37 |
|||
Public Const PCI_7443 = 38 |
|||
Public Const PCI_7444 = 39 |
|||
Public Const PCI_9221 = 40 |
|||
|
|||
Public Const MAX_CARD As Short = 32 |
|||
|
|||
'Error Code |
|||
Public Const NoError As Short = 0 |
|||
Public Const ErrorUnknownCardType As Short = -1 |
|||
Public Const ErrorInvalidCardNumber As Short = -2 |
|||
Public Const ErrorTooManyCardRegistered As Short = -3 |
|||
Public Const ErrorCardNotRegistered As Short = -4 |
|||
Public Const ErrorFuncNotSupport As Short = -5 |
|||
Public Const ErrorInvalidIoChannel As Short = -6 |
|||
Public Const ErrorInvalidAdRange As Short = -7 |
|||
Public Const ErrorContIoNotAllowed As Short = -8 |
|||
Public Const ErrorDiffRangeNotSupport As Short = -9 |
|||
Public Const ErrorLastChannelNotZero As Short = -10 |
|||
Public Const ErrorChannelNotDescending As Short = -11 |
|||
Public Const ErrorChannelNotAscending As Short = -12 |
|||
Public Const ErrorOpenDriverFailed As Short = -13 |
|||
Public Const ErrorOpenEventFailed As Short = -14 |
|||
Public Const ErrorTransferCountTooLarge As Short = -15 |
|||
Public Const ErrorNotDoubleBufferMode As Short = -16 |
|||
Public Const ErrorInvalidSampleRate As Short = -17 |
|||
Public Const ErrorInvalidCounterMode As Short = -18 |
|||
Public Const ErrorInvalidCounter As Short = -19 |
|||
Public Const ErrorInvalidCounterState As Short = -20 |
|||
Public Const ErrorInvalidBinBcdParam As Short = -21 |
|||
Public Const ErrorBadCardType As Short = -22 |
|||
Public Const ErrorInvalidDaRange As Short = -23 |
|||
Public Const ErrorAdTimeOut As Short = -24 |
|||
Public Const ErrorNoAsyncAI As Short = -25 |
|||
Public Const ErrorNoAsyncAO As Short = -26 |
|||
Public Const ErrorNoAsyncDI As Short = -27 |
|||
Public Const ErrorNoAsyncDO As Short = -28 |
|||
Public Const ErrorNotInputPort As Short = -29 |
|||
Public Const ErrorNotOutputPort As Short = -30 |
|||
Public Const ErrorInvalidDioPort As Short = -31 |
|||
Public Const ErrorInvalidDioLine As Short = -32 |
|||
Public Const ErrorContIoActive As Short = -33 |
|||
Public Const ErrorDblBufModeNotAllowed As Short = -34 |
|||
Public Const ErrorConfigFailed As Short = -35 |
|||
Public Const ErrorInvalidPortDirection As Short = -36 |
|||
Public Const ErrorBeginThreadError As Short = -37 |
|||
Public Const ErrorInvalidPortWidth As Short = -38 |
|||
Public Const ErrorInvalidCtrSource As Short = -39 |
|||
Public Const ErrorOpenFile As Short = -40 |
|||
Public Const ErrorAllocateMemory As Short = -41 |
|||
Public Const ErrorDaVoltageOutOfRange As Short = -42 |
|||
Public Const ErrorDaExtRefNotAllowed As Short = -43 |
|||
Public Const ErrorDIODataWidthError As Short = -44 |
|||
Public Const ErrorTaskCodeError As Short = -45 |
|||
Public Const ErrortriggercountError As Short = -46 |
|||
Public Const ErrorInvalidTriggerMode As Short = -47 |
|||
Public Const ErrorInvalidTriggerType As Short = -48 |
|||
Public Const ErrorInvalidCounterValue As Short = -50 |
|||
Public Const ErrorInvalidEventHandle As Short = -60 |
|||
Public Const ErrorNoMessageAvailable As Short = -61 |
|||
Public Const ErrorEventMessgaeNotAdded As Short = -62 |
|||
Public Const ErrorCalibrationTimeOut = -63 |
|||
Public Const ErrorUndefinedParameter = -64 |
|||
Public Const ErrorInvalidBufferID = -65 |
|||
|
|||
'Error code for driver API |
|||
Public Const ErrorConfigIoctl As Short = -201 |
|||
Public Const ErrorAsyncSetIoctl As Short = -202 |
|||
Public Const ErrorDBSetIoctl As Short = -203 |
|||
Public Const ErrorDBHalfReadyIoctl As Short = -204 |
|||
Public Const ErrorContOPIoctl As Short = -205 |
|||
Public Const ErrorContStatusIoctl As Short = -206 |
|||
Public Const ErrorPIOIoctl As Short = -207 |
|||
Public Const ErrorDIntSetIoctl As Short = -208 |
|||
Public Const ErrorWaitEvtIoctl As Short = -209 |
|||
Public Const ErrorOpenEvtIoctl As Short = -210 |
|||
Public Const ErrorCOSIntSetIoctl As Short = -211 |
|||
Public Const ErrorMemMapIoctl As Short = -212 |
|||
Public Const ErrorMemUMapSetIoctl As Short = -213 |
|||
Public Const ErrorCTRIoctl As Short = -214 |
|||
Public Const ErrorGetResIoctl As Short = -215 |
|||
Public Const ErrorCalIoctl = -216 |
|||
|
|||
'Synchronous Mode |
|||
Public Const SYNCH_OP As Short = 1 |
|||
Public Const ASYNCH_OP As Short = 2 |
|||
|
|||
'AD Range |
|||
Public Const AD_B_10_V As Short = 1 |
|||
Public Const AD_B_5_V As Short = 2 |
|||
Public Const AD_B_2_5_V As Short = 3 |
|||
Public Const AD_B_1_25_V As Short = 4 |
|||
Public Const AD_B_0_625_V As Short = 5 |
|||
Public Const AD_B_0_3125_V As Short = 6 |
|||
Public Const AD_B_0_5_V As Short = 7 |
|||
Public Const AD_B_0_05_V As Short = 8 |
|||
Public Const AD_B_0_005_V As Short = 9 |
|||
Public Const AD_B_1_V As Short = 10 |
|||
Public Const AD_B_0_1_V As Short = 11 |
|||
Public Const AD_B_0_01_V As Short = 12 |
|||
Public Const AD_B_0_001_V As Short = 13 |
|||
Public Const AD_U_20_V As Short = 14 |
|||
Public Const AD_U_10_V As Short = 15 |
|||
Public Const AD_U_5_V As Short = 16 |
|||
Public Const AD_U_2_5_V As Short = 17 |
|||
Public Const AD_U_1_25_V As Short = 18 |
|||
Public Const AD_U_1_V As Short = 19 |
|||
Public Const AD_U_0_1_V As Short = 20 |
|||
Public Const AD_U_0_01_V As Short = 21 |
|||
Public Const AD_U_0_001_V As Short = 22 |
|||
Public Const AD_B_2_V = 23 |
|||
Public Const AD_U_2_V = 24 |
|||
Public Const AD_B_0_2_V = 25 |
|||
|
|||
'Trigger Source |
|||
Public Const TRIG_SOFTWARE As Short = 0 |
|||
Public Const TRIG_INT_PACER As Short = 1 |
|||
Public Const TRIG_EXT_STROBE As Short = 2 |
|||
Public Const TRIG_HANDSHAKE As Short = 3 |
|||
Public Const TRIG_CLK_10MHZ As Short = 4 'PCI-7300A |
|||
Public Const TRIG_CLK_20MHZ As Short = 5 'PCI-7300A |
|||
Public Const TRIG_DO_CLK_TIMER_ACK As Short = 6 'PCI-7300A Rev. B |
|||
Public Const TRIG_DO_CLK_10M_ACK As Short = 7 'PCI-7300A Rev. B |
|||
Public Const TRIG_DO_CLK_20M_ACK As Short = 8 'PCI-7300A Rev. B |
|||
|
|||
'Virtual sampling rate for using external clock as the clock source |
|||
Public Const CLKSRC_EXT_SampRate As Short = 10000 |
|||
|
|||
'--------- Constants for PCI-6208A -------------- |
|||
'Output Mode |
|||
Public Const P6208_CURRENT_0_20MA As Short = 0 |
|||
Public Const P6208_CURRENT_5_25MA As Short = 1 |
|||
Public Const P6208_CURRENT_4_20MA As Short = 3 |
|||
|
|||
'--------- Constants for PCI-6308A/PCI-6308V -------------- |
|||
'Output Mode |
|||
Public Const P6308_CURRENT_0_20MA As Short = 0 |
|||
Public Const P6308_CURRENT_5_25MA As Short = 1 |
|||
Public Const P6308_CURRENT_4_20MA As Short = 3 |
|||
'AO Setting |
|||
Public Const P6308V_AO_CH0_3 As Short = 0 |
|||
Public Const P6308V_AO_CH4_7 As Short = 1 |
|||
Public Const P6308V_AO_UNIPOLAR As Short = 0 |
|||
Public Const P6308V_AO_BIPOLAR As Short = 1 |
|||
|
|||
'--------- Constants for PCI-7200 -------------- |
|||
'InputMode |
|||
Public Const DI_WAITING As Short = &H2s |
|||
Public Const DI_NOWAITING As Short = &H0s |
|||
|
|||
Public Const DI_TRIG_RISING As Short = &H4s |
|||
Public Const DI_TRIG_FALLING As Short = &H0s |
|||
|
|||
Public Const IREQ_RISING As Short = &H8s |
|||
Public Const IREQ_FALLING As Short = &H0s |
|||
|
|||
'Output Mode |
|||
Public Const OREQ_ENABLE As Short = &H10s |
|||
Public Const OREQ_DISABLE As Short = &H0s |
|||
|
|||
Public Const OTRIG_HIGH As Short = &H20s |
|||
Public Const OTRIG_LOW As Short = &H0s |
|||
|
|||
'--------- Constants for PCI-7248/7296/7442 -------------- |
|||
'DIO Port Direction |
|||
Public Const INPUT_PORT As Short = 1 |
|||
Public Const OUTPUT_PORT As Short = 2 |
|||
'DIO Line Direction |
|||
Public Const INPUT_LINE As Short = 1 |
|||
Public Const OUTPUT_LINE As Short = 2 |
|||
|
|||
'Channel&Port |
|||
Public Const Channel_P1A As Short = 0 |
|||
Public Const Channel_P1B As Short = 1 |
|||
Public Const Channel_P1C As Short = 2 |
|||
Public Const Channel_P1CL As Short = 3 |
|||
Public Const Channel_P1CH As Short = 4 |
|||
Public Const Channel_P1AE As Short = 10 |
|||
Public Const Channel_P1BE As Short = 11 |
|||
Public Const Channel_P1CE As Short = 12 |
|||
Public Const Channel_P2A As Short = 5 |
|||
Public Const Channel_P2B As Short = 6 |
|||
Public Const Channel_P2C As Short = 7 |
|||
Public Const Channel_P2CL As Short = 8 |
|||
Public Const Channel_P2CH As Short = 9 |
|||
Public Const Channel_P2AE As Short = 15 |
|||
Public Const Channel_P2BE As Short = 16 |
|||
Public Const Channel_P2CE As Short = 17 |
|||
Public Const Channel_P3A As Short = 10 |
|||
Public Const Channel_P3B As Short = 11 |
|||
Public Const Channel_P3C As Short = 12 |
|||
Public Const Channel_P3CL As Short = 13 |
|||
Public Const Channel_P3CH As Short = 14 |
|||
Public Const Channel_P4A As Short = 15 |
|||
Public Const Channel_P4B As Short = 16 |
|||
Public Const Channel_P4C As Short = 17 |
|||
Public Const Channel_P4CL As Short = 18 |
|||
Public Const Channel_P4CH As Short = 19 |
|||
Public Const Channel_P5A As Short = 20 |
|||
Public Const Channel_P5B As Short = 21 |
|||
Public Const Channel_P5C As Short = 22 |
|||
Public Const Channel_P5CL As Short = 23 |
|||
Public Const Channel_P5CH As Short = 24 |
|||
Public Const Channel_P6A As Short = 25 |
|||
Public Const Channel_P6B As Short = 26 |
|||
Public Const Channel_P6C As Short = 27 |
|||
Public Const Channel_P6CL As Short = 28 |
|||
Public Const Channel_P6CH As Short = 29 |
|||
Public Const Channel_P1 As Short = 30 |
|||
Public Const Channel_P2 As Short = 31 |
|||
Public Const Channel_P3 As Short = 32 |
|||
Public Const Channel_P4 As Short = 33 |
|||
Public Const Channel_P1E As Short = 34 |
|||
Public Const Channel_P2E As Short = 35 |
|||
Public Const Channel_P3E As Short = 36 |
|||
Public Const Channel_P4E As Short = 37 |
|||
' 7442 |
|||
Public Const P7442_CH0 As Short = 0 |
|||
Public Const P7442_CH1 As Short = 1 |
|||
Public Const P7442_TTL0 As Short = 2 |
|||
Public Const P7442_TTL1 As Short = 3 |
|||
' P7443 |
|||
Public Const P7443_CH0 = 0 |
|||
Public Const P7443_CH1 = 1 |
|||
Public Const P7443_CH2 = 2 |
|||
Public Const P7443_CH3 = 3 |
|||
Public Const P7443_TTL0 = 4 |
|||
Public Const P7443_TTL1 = 5 |
|||
' P7444 |
|||
Public Const P7444_CH0 = 0 |
|||
Public Const P7444_CH1 = 1 |
|||
Public Const P7444_CH2 = 2 |
|||
Public Const P7444_CH3 = 3 |
|||
Public Const P7444_TTL0 = 4 |
|||
Public Const P7444_TTL1 = 5 |
|||
'--------- Constants for PCI-7300A -------------- |
|||
'Wait Status |
|||
Public Const P7300_WAIT_NO As Short = 0 |
|||
Public Const P7300_WAIT_TRG As Short = 1 |
|||
Public Const P7300_WAIT_FIFO As Short = 2 |
|||
Public Const P7300_WAIT_BOTH As Short = 3 |
|||
|
|||
'Terminator control |
|||
Public Const P7300_TERM_OFF As Short = 0 |
|||
Public Const P7300_TERM_ON As Short = 1 |
|||
|
|||
'DI control signals polarity for PCI-7300A Rev. B |
|||
Public Const P7300_DIREQ_POS As Short = &H0s |
|||
Public Const P7300_DIREQ_NEG As Short = &H1s |
|||
Public Const P7300_DIACK_POS As Short = &H0s |
|||
Public Const P7300_DIACK_NEG As Short = &H2s |
|||
Public Const P7300_DITRIG_POS As Short = &H0s |
|||
Public Const P7300_DITRIG_NEG As Short = &H4s |
|||
|
|||
'DO control signals polarity for PCI-7300A Rev. B |
|||
Public Const P7300_DOREQ_POS As Short = &H0s |
|||
Public Const P7300_DOREQ_NEG As Short = &H8s |
|||
Public Const P7300_DOACK_POS As Short = &H0s |
|||
Public Const P7300_DOACK_NEG As Short = &H10s |
|||
Public Const P7300_DOTRIG_POS As Short = &H0s |
|||
Public Const P7300_DOTRIG_NEG As Short = &H20s |
|||
|
|||
'--------- Constants for PCI-7432/7433/7434 -------------- |
|||
Public Const CHANNEL_DI_LOW As Short = 0 |
|||
Public Const CHANNEL_DI_HIGH As Short = 1 |
|||
Public Const CHANNEL_DO_LOW As Short = 0 |
|||
Public Const CHANNEL_DO_HIGH As Short = 1 |
|||
Public Const P7432R_DO_LED As Short = 1 |
|||
Public Const P7433R_DO_LED As Short = 0 |
|||
Public Const P7434R_DO_LED As Short = 2 |
|||
Public Const P7432R_DI_SLOT As Short = 1 |
|||
Public Const P7433R_DI_SLOT As Short = 2 |
|||
Public Const P7434R_DI_SLOT As Short = 0 |
|||
|
|||
'----- Dual-Interrupt Source control for PCI-7248/49/96 & 7230 & 8554 & 7396 &7256/58 & 7260----- |
|||
Public Const INT1_DISABLE As Short = -1 'INT1 Disabled |
|||
Public Const INT1_COS As Short = 0 'INT1 COS : only available for PCI-7396, PCI-7256/58 & PCI-7260 |
|||
Public Const INT1_FP1C0 As Short = 1 'INT1 by Falling edge of P1C0 |
|||
Public Const INT1_RP1C0_FP1C3 As Short = 2 'INT1 by P1C0 Rising or P1C3 Falling |
|||
Public Const INT1_EVENT_COUNTER As Short = 3 'INT1 by Event Counter down to zero |
|||
Public Const INT1_EXT_SIGNAL As Short = 1 'INT1 by external signal : only available for PCI7432/PCI7433/PCI7230 |
|||
Public Const INT1_COUT12 As Short = 1 'INT1 COUT12 : only available for PCI8554 |
|||
Public Const INT1_CH0 As Short = 1 'INT1 CH0 : only available for PCI7256/58/60 |
|||
Public Const INT1_COS0 As Short = 1 'INT1 COS0 : only available for PCI-7452/PCI-7443 |
|||
Public Const INT1_COS1 As Short = 2 'INT1 COS1 : only available for PCI-7452/PCI-7443 |
|||
Public Const INT1_COS2 As Short = 3 'INT1 COS2 : only available for PCI-7452/PCI-7443 |
|||
Public Const INT1_COS3 As Short = 8 'INT1 COS3 : only available for PCI-7452/PCI-7443 |
|||
Public Const INT2_DISABLE As Short = -1 'INT2 Disabled |
|||
Public Const INT2_COS As Short = 0 'INT2 COS : only available for PCI-7396 |
|||
Public Const INT2_FP2C0 As Short = 1 'INT2 by Falling edge of P2C0 |
|||
Public Const INT2_RP2C0_FP2C3 As Short = 2 'INT2 by P2C0 Rising or P2C3 Falling |
|||
Public Const INT2_TIMER_COUNTER As Short = 3 'INT2 by Timer Counter down to zero |
|||
Public Const INT2_EXT_SIGNAL As Short = 1 'INT2 by external signal : only available for PCI7432/PCI7433/PCI7230 |
|||
Public Const INT2_CH1 As Short = 2 'INT2 CH1 : only available for PCI7256/58/60 |
|||
Public Const INT2_WDT As Short = 4 'INT2 by WDT |
|||
|
|||
Public Const WDT_OVRFLOW_SAFETYOUT As Short = &H8000s 'enable safteyout while WDT overflow |
|||
'-------- Constants for PCI-8554 -------------------- |
|||
'Clock Source of Cunter N |
|||
Public Const ECKN As Short = 0 |
|||
Public Const COUTN_1 As Short = 1 |
|||
Public Const CK1 As Short = 2 |
|||
Public Const COUT10 As Short = 3 |
|||
|
|||
'Clock Source of CK1 |
|||
Public Const CK1_C8M As Short = 0 |
|||
Public Const CK1_COUT11 As Short = 1 |
|||
|
|||
'Debounce Clock |
|||
Public Const DBCLK_COUT11 As Short = 0 |
|||
Public Const DBCLK_2MHZ As Short = 1 |
|||
|
|||
'--------- Constants for PCI-9111 -------------- |
|||
'Dual Interrupt Mode |
|||
Public Const P9111_INT1_EOC As Short = 0 'Ending of AD conversion |
|||
Public Const P9111_INT1_FIFO_HF As Short = 1 'FIFO Half Full |
|||
Public Const P9111_INT2_PACER As Short = 0 'Every Timer tick |
|||
Public Const P9111_INT2_EXT_TRG As Short = 1 'ExtTrig High->Low |
|||
|
|||
'Channel Count |
|||
Public Const P9111_CHANNEL_DO As Short = 0 |
|||
Public Const P9111_CHANNEL_EDO As Short = 1 |
|||
Public Const P9111_CHANNEL_DI As Short = 0 |
|||
Public Const P9111_CHANNEL_EDI As Short = 1 |
|||
|
|||
'Trigger Mode |
|||
Public Const P9111_TRGMOD_SOFT As Short = 0 'Software Trigger Mode |
|||
Public Const P9111_TRGMOD_PRE As Short = 1 'Pre-Trigger Mode |
|||
Public Const P9111_TRGMOD_POST As Short = 2 'Post Trigger Mode |
|||
|
|||
'EDO function |
|||
Public Const P9111_EDO_INPUT As Short = 1 'EDO port set as Input port |
|||
Public Const P9111_EDO_OUT_EDO As Short = 2 'EDO port set as Output port |
|||
Public Const P9111_EDO_OUT_CHN As Short = 3 'EDO port set as channel number ouput port |
|||
|
|||
'AO Setting |
|||
Public Const P9111_AO_UNIPOLAR As Short = 0 |
|||
Public Const P9111_AO_BIPOLAR As Short = 1 |
|||
|
|||
'--------- Constants for PCI-9118 -------------- |
|||
Public Const P9118_AI_BiPolar As Short = &H0s |
|||
Public Const P9118_AI_UniPolar As Short = &H1s |
|||
|
|||
Public Const P9118_AI_SingEnded As Short = &H0s |
|||
Public Const P9118_AI_Differential As Short = &H2s |
|||
|
|||
Public Const P9118_AI_ExtG As Short = &H4s |
|||
|
|||
Public Const P9118_AI_ExtTrig As Short = &H8s |
|||
|
|||
Public Const P9118_AI_DtrgNegative As Short = &H0s |
|||
Public Const P9118_AI_DtrgPositive As Short = &H10s |
|||
|
|||
Public Const P9118_AI_EtrgNegative As Short = &H0s |
|||
Public Const P9118_AI_EtrgPositive As Short = &H20s |
|||
|
|||
Public Const P9118_AI_BurstModeEn As Short = &H40s |
|||
Public Const P9118_AI_SampleHold As Short = &H80s |
|||
Public Const P9118_AI_PostTrgEn As Short = &H100s |
|||
Public Const P9118_AI_AboutTrgEn As Short = &H200s |
|||
|
|||
'--------- Constants for PCI-9812/9810 -------------- |
|||
'Channel Count |
|||
Public Const P9116_AI_LocalGND As Short = &H0s |
|||
Public Const P9116_AI_UserCMMD As Short = &H1s |
|||
Public Const P9116_AI_SingEnded As Short = &H0s |
|||
Public Const P9116_AI_Differential As Short = &H2s |
|||
Public Const P9116_AI_BiPolar As Short = &H0s |
|||
Public Const P9116_AI_UniPolar As Short = &H4s |
|||
|
|||
Public Const P9116_TRGMOD_SOFT As Short = &H0s 'Software Trigger Mode |
|||
Public Const P9116_TRGMOD_POST As Short = &H10s 'Post Trigger Mode |
|||
Public Const P9116_TRGMOD_DELAY As Short = &H20s 'Delay Trigger Mode |
|||
Public Const P9116_TRGMOD_PRE As Short = &H30s 'Pre-Trigger Mode |
|||
Public Const P9116_TRGMOD_MIDL As Short = &H40s 'Middle Trigger Mode |
|||
Public Const P9116_AI_TrgPositive As Short = &H0s |
|||
Public Const P9116_AI_TrgNegative As Short = &H80s |
|||
Public Const P9116_AI_IntTimeBase As Short = &H0s |
|||
Public Const P9116_AI_ExtTimeBase As Short = &H100s |
|||
Public Const P9116_AI_DlyInSamples As Short = &H200s |
|||
Public Const P9116_AI_DlyInTimebase As Short = &H0s |
|||
Public Const P9116_AI_ReTrigEn As Short = &H400s |
|||
Public Const P9116_AI_MCounterEn As Short = &H800s |
|||
Public Const P9116_AI_SoftPolling As Short = &H0s |
|||
Public Const P9116_AI_INT As Short = &H1000s |
|||
Public Const P9116_AI_DMA As Short = &H2000s |
|||
|
|||
'--------- Constants for PCI-9812/9810 -------------- |
|||
'Channel Count |
|||
Public Const P9812_CHANNEL_CNT1 As Short = 1 |
|||
Public Const P9812_CHANNEL_CNT2 As Short = 2 |
|||
Public Const P9812_CHANNEL_CNT4 As Short = 4 |
|||
|
|||
'Trigger Mode |
|||
Public Const P9812_TRGMOD_SOFT As Short = 0 'Software Trigger Mode |
|||
Public Const P9812_TRGMOD_POST As Short = 1 'Post Trigger Mode |
|||
Public Const P9812_TRGMOD_PRE As Short = 2 'Pre-Trigger Mode |
|||
Public Const P9812_TRGMOD_DELAY As Short = 3 'Delay Trigger Mode |
|||
Public Const P9812_TRGMOD_MIDL As Short = 4 'Middle Trigger Mode |
|||
|
|||
'Trigger Source |
|||
Public Const P9812_TRGSRC_CH0 As Short = 0 'trigger source --CH0 |
|||
Public Const P9812_TRGSRC_CH1 As Short = 8 'trigger source --CH1 |
|||
Public Const P9812_TRGSRC_CH2 As Short = &H10s 'trigger source --CH2 |
|||
Public Const P9812_TRGSRC_CH3 As Short = &H18s 'trigger source --CH3 |
|||
Public Const P9812_TRGSRC_EXT_DIG As Short = &H20s 'External Digital Trigger |
|||
|
|||
'Trigger Polarity |
|||
Public Const P9812_TRGSLP_POS As Short = 0 'Positive slope trigger |
|||
Public Const P9812_TRGSLP_NEG As Short = &H40s 'Negative slope trigger |
|||
|
|||
'Frequency Selection |
|||
Public Const P9812_AD2_GT_PCI As Short = &H80s 'Freq. of A/D clock > PCI clock freq. |
|||
Public Const P9812_AD2_LT_PCI As Short = &H0s 'Freq. of A/D clock < PCI clock freq. |
|||
|
|||
'Clock Source |
|||
Public Const P9812_CLKSRC_INT As Short = &H0s 'Internal clock |
|||
Public Const P9812_CLKSRC_EXT_SIN As Short = &H100s 'External SIN wave clock |
|||
Public Const P9812_CLKSRC_EXT_DIG As Short = &H200s 'External Square wave clock |
|||
|
|||
'-------- Constants for PCI-9221 -------------------- |
|||
'Input Type |
|||
Public Const P9221_AI_SingEnded = &H0 |
|||
Public Const P9221_AI_NonRef_SingEnded = &H1 |
|||
Public Const P9221_AI_Differential = &H2 |
|||
|
|||
'Trigger Mode |
|||
Public Const P9221_TRGMOD_SOFT = &H0 |
|||
Public Const P9221_TRGMOD_ExtD = &H8 |
|||
'Trigger Source |
|||
Public Const P9221_TRGSRC_GPI0 = &H0 |
|||
Public Const P9221_TRGSRC_GPI1 = &H1 |
|||
Public Const P9221_TRGSRC_GPI2 = &H2 |
|||
Public Const P9221_TRGSRC_GPI3 = &H3 |
|||
Public Const P9221_TRGSRC_GPI4 = &H4 |
|||
Public Const P9221_TRGSRC_GPI5 = &H5 |
|||
Public Const P9221_TRGSRC_GPI6 = &H6 |
|||
Public Const P9221_TRGSRC_GPI7 = &H7 |
|||
|
|||
'TimeBase Mode |
|||
Public Const P9221_AI_IntTimeBase = &H0 |
|||
Public Const P9221_AI_ExtTimeBase = &H80 |
|||
'TimeBase Source |
|||
Public Const P9221_TimeBaseSRC_GPI0 = &H0 |
|||
Public Const P9221_TimeBaseSRC_GPI1 = &H10 |
|||
Public Const P9221_TimeBaseSRC_GPI2 = &H20 |
|||
Public Const P9221_TimeBaseSRC_GPI3 = &H30 |
|||
Public Const P9221_TimeBaseSRC_GPI4 = &H40 |
|||
Public Const P9221_TimeBaseSRC_GPI5 = &H50 |
|||
Public Const P9221_TimeBaseSRC_GPI6 = &H60 |
|||
Public Const P9221_TimeBaseSRC_GPI7 = &H70 |
|||
|
|||
'EMG shdn ctrl code |
|||
Public Const EMGSHDN_OFF As Short = 0 'off |
|||
Public Const EMGSHDN_ON As Short = 1 'on |
|||
Public Const EMGSHDN_RECOVERY As Short = 2 'recovery |
|||
|
|||
'Hot Reset Hold ctrl code |
|||
Public Const HRH_OFF As Short = 0 'off |
|||
Public Const HRH_ON As Short = 1 'on |
|||
|
|||
'--------- Constants for Timer/Counter -------------- |
|||
'Counter Mode (8254) |
|||
Public Const TOGGLE_OUTPUT As Short = 0 'Toggle output from low to high on terminal count |
|||
Public Const PROG_ONE_SHOT As Short = 1 'Programmable one-shot |
|||
Public Const RATE_GENERATOR As Short = 2 'Rate generator |
|||
Public Const SQ_WAVE_RATE_GENERATOR As Short = 3 'Square wave rate generator |
|||
Public Const SOFT_TRIG As Short = 4 'Software-triggered strobe |
|||
Public Const HARD_TRIG As Short = 5 'Hardware-triggered strobe |
|||
|
|||
'------- General Purpose Timer/Counter ----------------- |
|||
'Counter Mode |
|||
Public Const General_Counter As Short = &H0S 'general counter |
|||
Public Const Pulse_Generation As Short = &H1S 'pulse generation |
|||
'GPTC clock source |
|||
Public Const GPTC_CLKSRC_EXT As Short = &H8S |
|||
Public Const GPTC_CLKSRC_INT As Short = &H0S |
|||
Public Const GPTC_GATESRC_EXT As Short = &H10S |
|||
Public Const GPTC_GATESRC_INT As Short = &H0S |
|||
Public Const GPTC_UPDOWN_SELECT_EXT As Short = &H20S |
|||
Public Const GPTC_UPDOWN_SELECT_SOFT As Short = &H0S |
|||
Public Const GPTC_UP_CTR As Short = &H40S |
|||
Public Const GPTC_DOWN_CTR As Short = &H0S |
|||
Public Const GPTC_ENABLE As Short = &H80S |
|||
Public Const GPTC_DISABLE As Short = &H0S |
|||
|
|||
'General Purpose Timer/Counter for 9221 |
|||
'Counter Mode |
|||
Public Const SimpleGatedEventCNT = &H1 |
|||
Public Const SinglePeriodMSR = &H2 |
|||
Public Const SinglePulseWidthMSR = &H3 |
|||
Public Const SingleGatedPulseGen = &H4 |
|||
Public Const SingleTrigPulseGen = &H5 |
|||
Public Const RetrigSinglePulseGen = &H6 |
|||
Public Const SingleTrigContPulseGen = &H7 |
|||
Public Const ContGatedPulseGen = &H8 |
|||
Public Const EdgeSeparationMSR = &H9 |
|||
Public Const SingleTrigContPulseGenPWM = &HA |
|||
Public Const ContGatedPulseGenPWM = &HB |
|||
Public Const CW_CCW_Encoder = &HC |
|||
Public Const x1_AB_Phase_Encoder = &HD |
|||
Public Const x2_AB_Phase_Encoder = &HE |
|||
Public Const x4_AB_Phase_Encoder = &HF |
|||
Public Const Phase_Z = &H10 |
|||
|
|||
'GPTC clock source |
|||
Public Const GPTC_CLK_SRC_Ext = &H1 |
|||
Public Const GPTC_CLK_SRC_Int = &H0 |
|||
Public Const GPTC_GATE_SRC_Ext = &H2 |
|||
Public Const GPTC_GATE_SRC_Int = &H0 |
|||
Public Const GPTC_UPDOWN_Ext = &H4 |
|||
Public Const GPTC_UPDOWN_Int = &H0 |
|||
|
|||
'GPTC clock polarity |
|||
Public Const GPTC_CLKSRC_LACTIVE = &H1 |
|||
Public Const GPTC_CLKSRC_HACTIVE = &H0 |
|||
Public Const GPTC_GATE_LACTIVE = &H2 |
|||
Public Const GPTC_GATE_HACTIVE = &H0 |
|||
Public Const GPTC_UPDOWN_LACTIVE = &H4 |
|||
Public Const GPTC_UPDOWN_HACTIVE = &H0 |
|||
Public Const GPTC_OUTPUT_LACTIVE = &H8 |
|||
Public Const GPTC_OUTPUT_HACTIVE = &H0 |
|||
|
|||
Public Const IntGate = &H0 |
|||
Public Const IntUpDnCTR = &H1 |
|||
Public Const IntENABLE = &H2 |
|||
|
|||
Public Const GPTC_EZ0_ClearPhase0 = &H0 |
|||
Public Const GPTC_EZ0_ClearPhase1 = &H1 |
|||
Public Const GPTC_EZ0_ClearPhase2 = &H2 |
|||
Public Const GPTC_EZ0_ClearPhase3 = &H3 |
|||
|
|||
Public Const GPTC_EZ0_ClearMode0 = &H0 |
|||
Public Const GPTC_EZ0_ClearMode1 = &H1 |
|||
Public Const GPTC_EZ0_ClearMode2 = &H2 |
|||
|
|||
'Watchdog Timer |
|||
'Counter action |
|||
Public Const WDT_DISARM As Short = 0 |
|||
Public Const WDT_ARM As Short = 1 |
|||
Public Const WDT_RESTART As Short = 2 |
|||
|
|||
'Pattern ID |
|||
Public Const INIT_PTN As Short = 0 |
|||
Public Const EMGSHDN_PTN As Short = 1 |
|||
|
|||
'Pattern ID for 7442/7444 |
|||
Public Const INIT_PTN_CH0 As Short = 0 |
|||
Public Const INIT_PTN_CH1 As Short = 1 |
|||
Public Const INIT_PTN_CH2 As Short = 2 'only for 7444 |
|||
Public Const INIT_PTN_CH3 As Short = 3 'only for 7444 |
|||
Public Const SAFTOUT_PTN_CH0 As Short = 4 |
|||
Public Const SAFTOUT_PTN_CH1 As Short = 5 |
|||
Public Const SAFTOUT_PTN_CH2 As Short = 6 'only for 7444 |
|||
Public Const SAFTOUT_PTN_CH3 As Short = 7 'only for 7444 |
|||
|
|||
'16-bit binary or 4-decade BCD counter |
|||
Public Const BIN As Short = 0 |
|||
Public Const BCD As Short = 1 |
|||
|
|||
'DAQ Event type for the event message |
|||
Public Const AIEnd As Short = 0 |
|||
Public Const DIEnd As Short = 0 |
|||
Public Const DOEnd As Short = 0 |
|||
Public Const DBEvent As Short = 1 |
|||
|
|||
'EEPROM |
|||
Public Const EEPROM_DEFAULT_BANK = 0 |
|||
Public Const EEPROM_USER_BANK1 = 1 |
|||
|
|||
Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer |
|||
Public Delegate Sub CallbackDelegate() |
|||
|
|||
'------------------------------------------------------------------- |
|||
' PCIS-DASK Function prototype |
|||
'-----------------------------------------------------------------*/ |
|||
Declare Function Register_Card Lib "Pci-Dask.dll" (ByVal cardType As Short, ByVal card_num As Short) As Short |
|||
Declare Function Release_Card Lib "Pci-Dask.dll" (ByVal CardNumber As Short) As Short |
|||
Declare Function GetActualRate Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal SampleRate As Double, ByRef ActualRate As Double) As Short |
|||
Declare Function GetCardType Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef cardType As Short) As Short |
|||
Declare Function GetBaseAddr Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef BaseAddr As Integer, ByRef BaseAddr2 As Integer) As Short |
|||
Declare Function GetLCRAddr Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef LcrAddr As Integer) As Short |
|||
Declare Function GetCardIndexFromID Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef cardType As Short, ByRef cardIndex As Short) As Short |
|||
Declare Function EMGShutDownControl Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ctrl As Byte) As Short |
|||
Declare Function EMGShutDownStatus Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef ctrl As Byte) As Short |
|||
Declare Function HotResetHoldControl Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal Enable As Byte) As Short |
|||
Declare Function HotResetHoldStatus Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByRef sts As Byte) As Short |
|||
Declare Function SetInitPattern Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal patID As Byte, ByVal pattern As Integer) As Short |
|||
Declare Function GetInitPattern Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal patID As Byte, ByRef pattern As Integer) As Short |
|||
Declare Function IdentifyLED_Control Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ctrl As Byte) As Short |
|||
|
|||
'AI Functions |
|||
Declare Function AI_9111_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short, ByVal TrgMode As Short, ByVal wTraceCnt As Short) As Short |
|||
Declare Function AI_9112_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short) As Short |
|||
Declare Function AI_9113_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short) As Short |
|||
Declare Function AI_9114_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short) As Short |
|||
Declare Function AI_9114_PreTrigConfig Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal PreTrgEn As Short, ByVal TraceCnt As Short) As Short |
|||
Declare Function AI_9116_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ConfigCtrl As Short, ByVal TrigCtrl As Short, ByVal PostCnt As Short, ByVal MCnt As Short, ByVal ReTrgCnt As Short) As Short |
|||
Declare Function AI_9118_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wModeCtrl As Short, ByVal wFunCtrl As Short, ByVal wBurstCnt As Short, ByVal wPostCnt As Short) As Short |
|||
Declare Function AI_9221_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ConfigCtrl As Short, ByVal TrigCtrl As Short, ByVal ByValAutoResetBuf As Byte) |
|||
Declare Function AI_9812_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wTrgMode As Short, ByVal wTrgSrc As Short, ByVal wTrgPol As Short, ByVal wClkSel As Short, ByVal wTrgLevel As Short, ByVal wPostCnt As Short) As Short |
|||
Declare Function AI_9116_CounterInterval Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ScanIntrv As Integer, ByVal SampIntrv As Integer) As Short |
|||
Declare Function AI_9221_CounterInterval Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ScanIntrv As Integer, ByVal SampIntrv As Integer) As Short |
|||
Declare Function AI_9812_SetDiv Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal pacerVal As Integer) As Short |
|||
Declare Function AI_AsyncCheck Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Stopped As Byte, ByRef AccessCnt As Integer) As Short |
|||
Declare Function AI_AsyncClear Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef AccessCnt As Integer) As Short |
|||
Declare Function AI_AsyncDblBufferHalfReady Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef HalfReady As Byte, ByRef StopFlag As Byte) As Short |
|||
Declare Function AI_AsyncDblBufferMode Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Enable As Byte) As Short |
|||
Declare Function AI_AsyncDblBufferTransfer Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Short) As Short |
|||
Declare Function AI_AsyncDblBufferHandled Lib "Pci-Dask.dll" (ByVal CardNumber As Integer) As Integer |
|||
Declare Function AI_AsyncDblBufferToFile Lib "Pci-Dask.dll" (ByVal CardNumber As Integer) As Integer |
|||
Declare Function AI_ContReadChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal AdRange As Short, ByRef Buffer As Short, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContScanChannels Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wChannel As Short, ByVal wAdRange As Short, ByRef pwBuffer As Short, ByVal dwReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContReadMultiChannels Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal NumChans As Short, ByRef chans As Short, ByRef AdRanges As Short, ByRef Buffer As Short, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContReadChannelToFile Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal AdRange As Short, ByVal FileName As String, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContScanChannelsToFile Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wChannel As Short, ByVal wAdRange As Short, ByVal FileName As String, ByVal dwReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContReadMultiChannelsToFile Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal NumChans As Short, ByRef chans As Short, ByRef AdRanges As Short, ByVal FileName As String, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function AI_ContStatus Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Status As Short) As Short |
|||
Declare Function AI_InitialMemoryAllocated Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef MemSize As Integer) As Short |
|||
Declare Function AI_ReadChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal AdRange As Short, ByRef Value As Short) As Short |
|||
Declare Function AI_VReadChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal AdRange As Short, ByRef Voltage As Double) As Short |
|||
Declare Function AI_ScanReadChannels Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal Channel As Integer, ByVal AdRange As Integer, ByVal pwBuffer As Integer) As Integer |
|||
Declare Function AI_ReadMultiChannels Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal NumChans As Integer, ByVal pwChans As Integer, ByVal pwAdRanges As Integer, ByVal pwBuffer As Integer) As Integer |
|||
Declare Function AI_VoltScale Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal AdRange As Short, ByVal reading As Short, ByRef Voltage As Double) As Short |
|||
Declare Function AI_ContVScale Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal AdRange As Short, ByRef readingArray As UShort, ByRef voltageArray As Double, ByVal Count As Integer) As Short |
|||
Declare Function AI_AsyncDblBufferOverrun Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal op As Short, ByRef overrunFlag As Short) As Short |
|||
Declare Function AI_EventCallBack Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Mode As Short, ByVal EventType As Short, ByVal callbackAddr As CallbackDelegate) As Short |
|||
Declare Function AI_SetTimeOut Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal dwTimeOut As Long) As Integer |
|||
Declare Function AI_ContBufferReset Lib "Pci-Dask.dll" (ByVal CardNumber As Integer) As Integer |
|||
Declare Function AI_ContBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal pwBuffer As Short, ByVal ReadCount As Long, ByVal BufferId As Integer) As Integer |
|||
|
|||
'AO Functions |
|||
Declare Function AO_6208A_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal V2AMode As Short) As Short |
|||
Declare Function AO_6308A_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal V2AMode As Short) As Short |
|||
Declare Function AO_6308V_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal OutputPolarity As Short, ByVal refVoltage As Double) As Short |
|||
Declare Function AO_9111_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal OutputPolarity As Short) As Short |
|||
Declare Function AO_9112_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal refVoltage As Double) As Short |
|||
Declare Function AO_WriteChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal Value As Short) As Short |
|||
Declare Function AO_VWriteChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal Voltage As Double) As Short |
|||
Declare Function AO_VoltScale Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Channel As Short, ByVal Voltage As Double, ByRef binValue As Short) As Short |
|||
Declare Function AO_SimuWriteChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wGroup As Short, ByRef valueArray As Short) As Short |
|||
Declare Function AO_SimuVWriteChannel Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wGroup As Short, ByRef voltageArray As Double) As Short |
|||
|
|||
'DI Functions |
|||
Declare Function DI_7200_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short, ByVal wExtTrigEn As Short, ByVal wTrigPol As Short, ByVal wI_REQ_Pol As Short) As Short |
|||
Declare Function DI_7300A_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal PortWidth As Short, ByVal TrigSource As Short, ByVal WaitStatus As Short, ByVal Terminaor As Short, ByVal I_REQ_Pol As Short, ByVal clear_fifo As Byte, ByVal disable_di As Byte) As Short |
|||
Declare Function DI_7300B_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal PortWidth As Short, ByVal TrigSource As Short, ByVal WaitStatus As Short, ByVal Terminator As Short, ByVal I_Cntrl_Pol As Short, ByVal clear_fifo As Byte, ByVal disable_di As Byte) As Short |
|||
Declare Function DI_AsyncCheck Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Stopped As Byte, ByRef AccessCnt As Integer) As Short |
|||
Declare Function DI_AsyncClear Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef AccessCnt As Integer) As Short |
|||
Declare Function DI_AsyncDblBufferHalfReady Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef HalfReady As Byte) As Short |
|||
Declare Function DI_AsyncDblBufferMode Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Enable As Byte) As Short |
|||
Declare Function DI_AsyncDblBufferTransfer Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Byte) As Short |
|||
Declare Function DI_AsyncDblBufferTransfer Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Short) As Short |
|||
Declare Function DI_AsyncDblBufferTransfer Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As UInt32) As Short |
|||
Declare Function DI_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Byte, ByVal ReadCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DI_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Short, ByVal ReadCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DI_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As UInt32, ByVal ReadCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DI_ContMultiBufferStart Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal SampleRate As Double) As Short |
|||
Declare Function DI_AsyncMultiBufferNextReady Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef NextReady As Byte, ByRef BufferId As Short) As Short |
|||
Declare Function DI_ContReadPort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As Byte, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DI_ContReadPort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As UShort, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DI_ContReadPort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As UInt32, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DI_ContReadPortToFile Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal FileName As String, ByVal ReadCount As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DI_ContStatus Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Status As Short) As Short |
|||
Declare Function DI_InitialMemoryAllocated Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef MemSize As Integer) As Short |
|||
Declare Function DI_ReadPort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByRef Value As Integer) As Short |
|||
Declare Function DI_ReadLine Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal Line As Short, ByRef Value As Short) As Short |
|||
Declare Function DI_AsyncDblBufferOverrun Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal op As Short, ByRef overrunFlag As Short) As Short |
|||
Declare Function DI_EventCallBack Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Mode As Short, ByVal EventType As Short, ByVal callbackAddr As Integer) As Short |
|||
|
|||
'DO Functions |
|||
Declare Function DO_7200_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal TrigSource As Short, ByVal wOutReqEn As Short, ByVal wOutTrigSig As Short) As Short |
|||
Declare Function DO_7300A_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal PortWidth As Short, ByVal TrigSource As Short, ByVal WaitStatus As Short, ByVal Terminaor As Short, ByVal O_REQ_Pol As Short) As Short |
|||
Declare Function DO_7300B_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal PortWidth As Short, ByVal TrigSource As Short, ByVal WaitStatus As Short, ByVal Terminator As Short, ByVal O_Cntrl_Pol As Short, ByVal FifoThreshold As Integer) As Short |
|||
Declare Function DO_AsyncCheck Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Stopped As Byte, ByRef AccessCnt As Integer) As Short |
|||
Declare Function DO_AsyncClear Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef AccessCnt As Integer) As Short |
|||
Declare Function DO_ContWritePort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As Byte, ByVal WriteCount As Integer, ByVal Iterations As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DO_ContWritePort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As UShort, ByVal WriteCount As Integer, ByVal Iterations As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DO_ContWritePort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Integer, ByRef Buffer As UInt32, ByVal WriteCount As Integer, ByVal Iterations As Integer, ByVal SampleRate As Double, ByVal SyncMode As Short) As Short |
|||
Declare Function DO_ContStatus Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Status As Short) As Short |
|||
Declare Function DO_InitialMemoryAllocated Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef MemSize As Integer) As Short |
|||
Declare Function DO_PGStart Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Byte, ByVal WriteCount As Integer, ByVal SampleRate As Double) As Short |
|||
Declare Function DO_PGStart Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Short, ByVal WriteCount As Integer, ByVal SampleRate As Double) As Short |
|||
Declare Function DO_PGStart Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As UInt32, ByVal WriteCount As Integer, ByVal SampleRate As Double) As Short |
|||
Declare Function DO_PGStop Lib "Pci-Dask.dll" (ByVal CardNumber As Short) As Short |
|||
Declare Function DO_WritePort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal Value As Integer) As Short |
|||
Declare Function DO_WriteLine Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal Line As Short, ByVal Value As Short) As Short |
|||
Declare Function DO_SimuWritePort Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wNumChans As Short, ByRef pdwBuffer As Integer) As Short |
|||
Declare Function DO_ReadLine Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal Line As Short, ByRef Value As Short) As Short |
|||
Declare Function DO_ReadPort Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByRef Value As Integer) As Short |
|||
Declare Function EDO_9111_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wEDO_Fun As Short) As Short |
|||
Declare Function DO_WriteExtTrigLine Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Value As Short) As Short |
|||
Declare Function DO_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Byte, ByVal WriteCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DO_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As Short, ByVal WriteCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DO_ContMultiBufferSetup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef Buffer As UInt32, ByVal WriteCount As Integer, ByRef BufferId As Short) As Short |
|||
Declare Function DO_ContMultiBufferStart Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal SampleRate As Double) As Short |
|||
Declare Function DO_AsyncMultiBufferNextReady Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef NextReady As Byte, ByRef BufferId As Short) As Short |
|||
Declare Function DO_EventCallBack Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Mode As Short, ByVal EventType As Short, ByVal callbackAddr As Integer) As Short |
|||
|
|||
'DIO Functions |
|||
Declare Function DIO_PortConfig Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Port As Short, ByVal Direction As Short) As Short |
|||
Declare Function DIO_LinesConfig Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wPort As Short, ByVal wLinesdirmap As Short) As Short |
|||
Declare Function DIO_LineConfig Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wPort As Short, ByVal wLine As Short, ByVal wDirection As Short) As Short |
|||
Declare Function DIO_SetDualInterrupt Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal wInt1Mode As Short, ByVal wInt2Mode As Short, ByRef hEvent As Integer) As Short |
|||
Declare Function DIO_SetCOSInterrupt Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal Port As Short, ByVal ctlA As Short, ByVal ctlB As Short, ByVal ctlC As Short) As Short |
|||
Declare Function DIO_GetCOSLatchData Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef CosLData As Integer) As Short |
|||
Declare Function DIO_SetCOSInterrupt32 Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal Port As Byte, ByVal ctl As Integer, ByRef hEvent As Integer, ByVal bManualReset As Byte) As Short |
|||
Declare Function DIO_GetCOSLatchData32 Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef CosLData As Integer) As Short |
|||
Declare Function DIO_INT_EventMessage Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Mode As Short, ByVal hEvent As Integer, ByVal windowHandle As Integer, ByVal message As Integer, ByVal callbackAddr As CallbackDelegate) As Short |
|||
Declare Function DIO_INT1_EventMessage Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Int1Mode As Short, ByVal windowHandle As Integer, ByVal message As Integer, ByVal callbackAddr As CallbackDelegate) As Short |
|||
Declare Function DIO_INT2_EventMessage Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Int2Mode As Short, ByVal windowHandle As Integer, ByVal message As Integer, ByVal callbackAddr As CallbackDelegate) As Short |
|||
Declare Function DIO_7300SetInterrupt Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal AuxDIEn As Short, ByVal T2En As Short, ByRef hEvent As Integer) As Short |
|||
Declare Function DIO_AUXDI_EventMessage Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal AuxDIEn As Short, ByVal windowHandle As Integer, ByVal message As Integer, ByVal callbackAddr As CallbackDelegate) As Short |
|||
Declare Function DIO_T2_EventMessage Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal T2En As Short, ByVal windowHandle As Integer, ByVal message As Integer, ByVal callbackAddr As CallbackDelegate) As Short |
|||
|
|||
'Counter Functions |
|||
Declare Function CTR_Setup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Ctr As Short, ByVal Mode As Short, ByVal Count As Integer, ByVal BinBcd As Short) As Short |
|||
Declare Function CTR_Clear Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Ctr As Short, ByVal State As Short) As Short |
|||
Declare Function CTR_Read Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Ctr As Short, ByRef Value As Integer) As Short |
|||
Declare Function CTR_Update Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Ctr As Short, ByVal Count As Integer) As Short |
|||
Declare Function CTR_8554_ClkSrc_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal Ctr As Short, ByVal ClockSource As Short) As Short |
|||
Declare Function CTR_8554_CK1_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal ClockSource As Short) As Short |
|||
Declare Function CTR_8554_Debounce_Config Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal DebounceClock As Short) As Short |
|||
Declare Function GCTR_Setup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wGCtr As Short, ByVal wGCtrCtrl As Short, ByVal dwCount As Integer) As Short |
|||
Declare Function GCTR_Clear Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wGCtr As Short) As Short |
|||
Declare Function GCTR_Read Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wGCtr As Short, ByRef pValue As Integer) As Short |
|||
Declare Function GPTC_Clear Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal wGCtr As Integer) As Integer |
|||
Declare Function GPTC_Control Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal wGCtr As Integer, ByVal ParamID As Integer, ByVal Value As Integer) As Integer |
|||
Declare Function GPTC_Read Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal wGCtr As Integer, ByVal pValue As Long) As Integer |
|||
Declare Function GPTC_Setup Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal wGCtr As Integer, ByVal wMode As Integer, ByVal wSrcCtrl As Integer, ByVal wPolCtrl As Integer, ByVal LReg1_Val As Long, ByVal LReg2_Val As Long) As Integer |
|||
Declare Function GPTC_Status Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal wGCtr As Integer, ByVal pValue As Long) As Integer |
|||
Declare Function WDT_Setup Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wCtr As Short, ByVal ovflowSec As Single, ByRef actualSec As Single, ByRef hEvent As Integer) As Short |
|||
Declare Function WDT_Control Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wCtr As Short, ByVal action As Short) As Short |
|||
Declare Function WDT_Status Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByVal wCtr As Short, ByRef pValue As Integer) As Short |
|||
Declare Function WDT_Reload Lib "Pci-Dask.dll" (ByVal wCardNumber As Short, ByVal ovflowSec As Single, ByRef actualSec As Single) As Short |
|||
|
|||
Declare Function AI_GetEvent Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef hEvent As Integer) As Short |
|||
Declare Function AO_GetEvent Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef hEvent As Integer) As Short |
|||
Declare Function DI_GetEvent Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef hEvent As Integer) As Short |
|||
Declare Function DO_GetEvent Lib "Pci-Dask.dll" (ByVal CardNumber As Short, ByRef hEvent As Integer) As Short |
|||
|
|||
'Cal Function |
|||
Declare Function PCI_DB_Auto_Calibration_ALL Lib "Pci-Dask.dll" (ByVal CardNumber As Integer) As Integer |
|||
Declare Function PCI_Load_CAL_Data Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal bank As Integer) As Integer |
|||
Declare Function PCI_EEPROM_CAL_Constant_Update Lib "Pci-Dask.dll" (ByVal CardNumber As Integer, ByVal bank As Integer) As Integer |
|||
|
|||
End Module |
|||
@ -0,0 +1,72 @@ |
|||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ |
|||
Partial Class Form1 |
|||
Inherits System.Windows.Forms.Form |
|||
|
|||
'Form 覆寫 Dispose 以清除元件清單。 |
|||
<System.Diagnostics.DebuggerNonUserCode()> _ |
|||
Protected Overrides Sub Dispose(ByVal disposing As Boolean) |
|||
If disposing AndAlso components IsNot Nothing Then |
|||
components.Dispose() |
|||
End If |
|||
MyBase.Dispose(disposing) |
|||
End Sub |
|||
|
|||
'為 Windows Form 設計工具的必要項 |
|||
Private components As System.ComponentModel.IContainer |
|||
|
|||
'注意: 以下為 Windows Form 設計工具所需的程序 |
|||
'可以使用 Windows Form 設計工具進行修改。 |
|||
'請不要使用程式碼編輯器進行修改。 |
|||
<System.Diagnostics.DebuggerStepThrough()> _ |
|||
Private Sub InitializeComponent() |
|||
Me.label1 = New System.Windows.Forms.Label |
|||
Me.textBox1 = New System.Windows.Forms.TextBox |
|||
Me.button1 = New System.Windows.Forms.Button |
|||
Me.SuspendLayout() |
|||
' |
|||
'label1 |
|||
' |
|||
Me.label1.AutoSize = True |
|||
Me.label1.Location = New System.Drawing.Point(133, 23) |
|||
Me.label1.Name = "label1" |
|||
Me.label1.Size = New System.Drawing.Size(13, 12) |
|||
Me.label1.TabIndex = 8 |
|||
Me.label1.Text = "V" |
|||
' |
|||
'textBox1 |
|||
' |
|||
Me.textBox1.Location = New System.Drawing.Point(29, 12) |
|||
Me.textBox1.Name = "textBox1" |
|||
Me.textBox1.Size = New System.Drawing.Size(99, 22) |
|||
Me.textBox1.TabIndex = 7 |
|||
Me.textBox1.Text = "2" |
|||
Me.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right |
|||
' |
|||
'button1 |
|||
' |
|||
Me.button1.Location = New System.Drawing.Point(171, 12) |
|||
Me.button1.Name = "button1" |
|||
Me.button1.Size = New System.Drawing.Size(93, 22) |
|||
Me.button1.TabIndex = 6 |
|||
Me.button1.Text = "Output" |
|||
Me.button1.UseVisualStyleBackColor = True |
|||
' |
|||
'Form1 |
|||
' |
|||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) |
|||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font |
|||
Me.ClientSize = New System.Drawing.Size(292, 54) |
|||
Me.Controls.Add(Me.label1) |
|||
Me.Controls.Add(Me.textBox1) |
|||
Me.Controls.Add(Me.button1) |
|||
Me.Name = "Form1" |
|||
Me.Text = "Form1" |
|||
Me.ResumeLayout(False) |
|||
Me.PerformLayout() |
|||
|
|||
End Sub |
|||
Private WithEvents label1 As System.Windows.Forms.Label |
|||
Private WithEvents textBox1 As System.Windows.Forms.TextBox |
|||
Private WithEvents button1 As System.Windows.Forms.Button |
|||
|
|||
End Class |
|||
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
Public Class Form1 |
|||
Dim m_dev As Short |
|||
|
|||
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load |
|||
m_dev = Register_Card(PCI_6208V, 0) |
|||
If (m_dev < 0) Then |
|||
MessageBox.Show("PCI_6208V error!") |
|||
End If |
|||
End Sub |
|||
|
|||
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing |
|||
Dim ret As Short |
|||
If (m_dev >= 0) Then |
|||
ret = DASK.Release_Card(m_dev) |
|||
End If |
|||
End Sub |
|||
|
|||
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click |
|||
Dim err As Short |
|||
Dim out_value As Double |
|||
If (Double.TryParse(textBox1.Text, out_value)) Then |
|||
err = DASK.AO_VWriteChannel(m_dev, 0, out_value) |
|||
If (err < 0) Then |
|||
MessageBox.Show("AO_VWriteChannel error!") |
|||
End If |
|||
Else |
|||
MessageBox.Show("Input error!") |
|||
End If |
|||
End Sub |
|||
End Class |
|||
@ -0,0 +1,38 @@ |
|||
'------------------------------------------------------------------------------ |
|||
' <auto-generated> |
|||
' This code was generated by a tool. |
|||
' Runtime Version:2.0.50727.42 |
|||
' |
|||
' Changes to this file may cause incorrect behavior and will be lost if |
|||
' the code is regenerated. |
|||
' </auto-generated> |
|||
'------------------------------------------------------------------------------ |
|||
|
|||
Option Strict On |
|||
Option Explicit On |
|||
|
|||
|
|||
Namespace My |
|||
|
|||
'NOTE: This file is auto-generated; do not modify it directly. To make changes, |
|||
' or if you encounter build errors in this file, go to the Project Designer |
|||
' (go to Project Properties or double-click the My Project node in |
|||
' Solution Explorer), and make changes on the Application tab. |
|||
' |
|||
Partial Friend Class MyApplication |
|||
|
|||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ |
|||
Public Sub New() |
|||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) |
|||
Me.IsSingleInstance = false |
|||
Me.EnableVisualStyles = true |
|||
Me.SaveMySettingsOnExit = true |
|||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses |
|||
End Sub |
|||
|
|||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ |
|||
Protected Overrides Sub OnCreateMainForm() |
|||
Me.MainForm = Global.D6208_AO_OnePoint.Form1 |
|||
End Sub |
|||
End Class |
|||
End Namespace |
|||
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|||
<MySubMain>true</MySubMain> |
|||
<MainForm>Form1</MainForm> |
|||
<SingleInstance>false</SingleInstance> |
|||
<ShutdownMode>0</ShutdownMode> |
|||
<EnableVisualStyles>true</EnableVisualStyles> |
|||
<AuthenticationMode>0</AuthenticationMode> |
|||
<ApplicationType>0</ApplicationType> |
|||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit> |
|||
</MyApplicationData> |
|||
@ -0,0 +1,35 @@ |
|||
Imports System |
|||
Imports System.Reflection |
|||
Imports System.Runtime.InteropServices |
|||
|
|||
' 組件的一般資訊是由下列的屬性集控制。 |
|||
' 變更這些屬性的值即可修改組件的相關 |
|||
' 資訊。 |
|||
|
|||
' 檢閱組件屬性的值 |
|||
|
|||
<Assembly: AssemblyTitle("D6208_AO_OnePoint")> |
|||
<Assembly: AssemblyDescription("")> |
|||
<Assembly: AssemblyCompany("ADLINK")> |
|||
<Assembly: AssemblyProduct("D6208_AO_OnePoint")> |
|||
<Assembly: AssemblyCopyright("Copyright (C) ADLINK 2007")> |
|||
<Assembly: AssemblyTrademark("")> |
|||
|
|||
<Assembly: ComVisible(False)> |
|||
|
|||
'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID |
|||
<Assembly: Guid("7680ed4e-f60d-47a2-8ce9-a92b6c308e6a")> |
|||
|
|||
' 組件的版本資訊是由下列四項值構成: |
|||
' |
|||
' 主要版本 |
|||
' 次要版本 |
|||
' 組建編號 |
|||
' 修訂編號 |
|||
' |
|||
' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號 |
|||
' 指定為預設值: |
|||
' <Assembly: AssemblyVersion("1.0.*")> |
|||
|
|||
<Assembly: AssemblyVersion("1.0.0.0")> |
|||
<Assembly: AssemblyFileVersion("1.0.0.0")> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue