03-06-2009 03:31 PM
PS: I looked at your VI that you created called Cal Frequency and duty Cycle1.vi and I thought that was a really cool VI. I think that is very clever and I think other poeple could benefit from that as well. I would really encourage you to post that as an example program on our community site, so everyone can utilize your tricks. To post your code, all you have to do is to go to ni.com/community and make sure you're logged in. Then at the top of the page you can select "New>>Document" and then select "Example Program" when the menu comes up. It's extremely easy and would help everyone out.
Just thought I'd mention it. Thanks.
03-10-2009 11:26 AM
Hi Chris,
First thanks for you spent a lot of time helping me out. The reason, I have so many tasks because my project is 20 channels PWM signal. I started 2 channels because I want to see it works or not.
Thank you so much again!
Johnny
03-19-2009 04:55 AM
Hello,
I've following project: Read 2 counters with PCI 6602 and daqmx and make period measurement. I think its very similar to this topic. But I need c# code.
Can anybody help me?
Thanks André
03-19-2009 07:47 AM
You can follow the same basic form of the LabVIEW code that we have been passing back and forth. You'll simply have to use the DAQmx C Reference Help to translate the VIs to C functions. They map 1 to 1. You can find your C reference help if you go to Start>>Programs>>National Instruments>>NI-DAQ>>Documentation>>NI-DAQmx C Reference Help. Have fun!
Chris
03-20-2009 03:55 AM
Thank you for your Reply.
I'm understanding right: The buffer is configured that it can hold 1000 samples. And the there are 100 reading operations with 10 samples each ?
My Question is: How can realize the coresponding callback function in C#?
Something like that:
myCounter.BeginReadMultiSampleDouble(10,Callback,null)
Callback()
{
data= .myCounter.EndReadMultisampleDouble() //Saving data
myCounter.BeginReadMultiSampleDouble(10,Callback,null);
}
Thanks
andré
03-23-2009 11:01 AM
Hi Andre,
This type of callback is realized in the following example: "Meas2EdgeSeparation_BufCont"
You can find this C# example in the following folder location, if you have NI-DAQmx installed with support for .NET.
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET<X.X>\Counter\Measure 2 Edge Separation\Meas2EdgeSeparation_BufCont\cs
This example uses an asynchronous callback function to retrieve the data and display it on the UI. You can modify the code to save the data to a file or anything else you'd like to do in that callback. I hope this helps.
Chris W