07-15-2010 09:38 AM
I have just purchased a USB 6501. At this point I am unable to run a number of the code examples that came with the latest NIDAQ902-1 package.
In particular I am unable to run in VB the code "ContWriteDigChan_PipeSampClk". I am running;
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5
Installed Edition: Professional
Microsoft Visual Basic 2008 91605-031-5000002-60668
On loading the code it runs the "Upgrade wizard", which perhaps is the root of the problem. It appears to be upgrading form Net1.0 to Net3.0.
When I run the code I get an exception error when the code comes to the line of code;
myTask.Timing.ConfigurePipelinedSampleClock("", CType(samplesClockRateNumericUpDown.Value, Double), SampleClockActiveEdge.Rising, _
SampleQuantityMode.ContinuousSamples, CType(samplesPerBufferNumericUpDown.Value, Integer))
where myTask=>Assembly NationalInstruments.DAQmx
The exception error I receive is;
Requested value is not a supported value for this property. Property: NationalInstruments.DAQmx.Timing.SampleTimingType You Have Requested: NationalInstruments.DAQmx.SampleTimingType.PipelinedSampleClock You Can Select: NationalInstruments.DAQmx.SampleTimingType.OnDemand Task Name: _unnamedTask<0> Status Code: -200077
I have tried unsuccessfully to remedy the situation by following the instructions above. Have you any advice on how to fix this problem?
Solved! Go to Solution.
07-15-2010 10:13 AM
So what is the new error when you change to OnDemand timing?
07-15-2010 10:37 AM
When I type in the following;
NationalInstruments.DAQmx.SampleTimingType.OnDemand()
The following coding error occurs; "Expression is not a method"
07-15-2010 11:02 AM
I don't think that's the correct syntax but I can't quickly find the .NET examples on my pc.
07-15-2010 11:36 AM
Is there anybody that you know at NI that has written more recent code that uses the
SampleTimingType.OnDemand method?
07-16-2010 03:25 PM
If the requested value is not supported, make sure that you are not trying to sample faster than what your device can do. Also make sure that you are sampling at voltage levels supported by your device. Besides this, make sure that you are following correct naming conventions for your DAQmx tasks, such as not using an underscore character in front of your task name.
07-19-2010 03:44 PM
Thnaks this seems to be the problem; the call is not supported by the product that I have.....
I am using a NI 6501 USB.
If I use either of the following write statements to the 6501, it is taking approximately 1.4mS to complete to write statement.
WriteSingleSampleMultiLine or WriteSingleSampleSingleLine
The clock frequency of the computer that I am using is 3.6MHz. Thus in order to write one “bit” it is taking about 4mS. I have complied the program and run it separately and this does not significantly increase the speed of the operation.
Is this the sort of speed that I should expect from this product? Is there another “write” statement that I can use, in order to speed up the process?
07-20-2010 03:16 PM
There is no other "write" function that you can use to speed the process. Have you made sure that your computer is not running out of RAM?
07-20-2010 03:31 PM
Not sure where you are getting the 4ms number. The time to do a write (~1.4 ms) is how long it takes to write a bit and is in line with these benchmarks.