Discussion:
Pulse Wave Generator using PCI 6533 card and .NET (C#)
(too old to reply)
dfwmike
2008-08-12 14:10:11 UTC
Permalink
Hello, I am using the PCI 6533 card and .NET (C#) to generate a pulse wave from 1 - 1000Hz. I am also using the SCB-68 pin shielded box to go out to the oscilloscope. My 6533 card is connected to the SCB through a 68 pin connector cable. I have tested the signal from the card to the oscilloscope to make sure that I have the correct pin connection from the card to the SCB to the oscilloscope. In my code I am using the "Task" object to output this frequency. I have the "DOChannel" using the "/dev/port0/line0:7" and setting the "ChannelLineGrouping" to OneChannelForEachLine. Because I must use all lines to use this object, I am generating the same data on all lines. I have tested this by probing each pin for the same data on the SCB. The pin that I am actually using for the test on the SCB is 10 (P0.0).My problem is that I am not able to generate the correct frequency. I am alittle confused in what value I should set for the "Timing" object in the "Task" object. I set the SampleClockRate to 32 and I receive a frequency of 16Hz that isn't actually constant also. If I set it to 64 I get a frequency of 32Hz, but if I set it to 1000, I get frequencies of all numbers. It seems when I use the low numbers, it is more inclined to staying between a small range. But when I use a large number, it produces all sorts of frequencies, none which are close to the frequency goal.I feel that I am not setting the correct properties for the "Task" object. What properties should I set to produce an accurate frequency? Am I using the correct objects to produce the frequency?
RT4CY
2008-08-14 16:40:10 UTC
Permalink
Hi dfwmike,

Thanks for posting on the NI Discussion Forums!  I have a couple questions for you.

-  What version of Visual Studio are you working in?
-  Do you have Measurement Studio?
-&nbsp;&nbsp;Are you working off a program you built yourself, or working from one of our <a href="http://digital.ni.com/public.nsf/allkb/39F4B9264B94308C8625729D0067F9AF?OpenDocument" target="_blank">shipping examples</a>?&nbsp;

I would recommend taking a look at the WriteDigChan_Ext Clk example in the cs folder.&nbsp; You can set the clock source to OnboardClock instead of a PFI line.&nbsp; Let me know if you are not able to successfully run one of our examples.
Loading...