Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Examples of continuous pulse train generation on a 6602 using C#

Hi All
 
I have an application in which I am hoping to use a 6602 counter timer to generate a square wave whose frequency can be varied, on the fly, between 10 Hertz and 250 KHertz.  Now I have been able to create a task using MAX to output the waveform on Counter 0 output but I am unable to duplicate it using my own software.  I am trying to write the code in C# using Visual Studio.Net 2005.  Does anyone have any examples or can offer any guidance on how I can best achieve this.
 
Any help would be gratefully appreciated.
 
Kind regards
 
Jamie
0 Kudos
Message 1 of 2
(4,205 Views)
Hi Jamie,

National Instruments provides a native .NET API for NI-DAQmx. This is available as a part of the NI-DAQmx driver and does not require Measurement Studio. You can find examples in the following default directory location (exaxple programs are located according to the Operating System and version of NI-DAQmx used):
  • For NI-DAQmx versions prior to NI-DAQmx 8.5 examples are stored in C:\Program Files\National Instruments\DotNET\Examples\DAQmx. Sub-folders named VB contain Visual Basic.NET examples, and sub-folders named CS contain C# examples. If the example directory path does not exist, make sure you have .NET support installed for NI-DAQmx.
  • Starting with NI-DAQ version 8.5, the .NET example paths have changed. In the following paths, x is the letter of the hard drive. The .NET example paths for Windows Vista are x:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET1.1 and x:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0.
  • The .NET example paths for Windows XP and Windows 2000 are x:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET1.1 and x:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0.
  • Double-click the .vbproj file to open the project.
Also, several examples can be found at NI Developer Zone. Let me know if this helps you.

Kind Regards,
0 Kudos
Message 2 of 2
(4,164 Views)