Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Problem by writting into the device buffer

$
0
0

Hello,

 

I have a problem with writing some values to a analog output. You can see the code in the following.

 

So my problem is, when I call the function PostHolding(0.004), I put some values in a array and at the end of this function I write the array into the device buffer for the analog output.

 

The call is this: DAQmxErrChk(DAQmxWriteAnalogF64 (taskHandle, (PostHoldingTime*SampleRate), 0, 10.0, DAQmx_Val_GroupByScanNumber, PostHoldingArray, NULL,NULL));

I  checked the array and the number of values for each channel and there is everything ok.

 

So now I come to the for loop and the if clause (array has the right values). With generatePatter() I generate a pattern, this is a global one. The return value shows me how many values are in the pattern. When I call now DAQmxErrChk(DAQmxWriteAnalogF64 (taskHandle, (newPointer-g_Pointer), 0, 10.0, DAQmx_Val_GroupByScanNumber, g_TotalPattern, NULL,NULL)); it should write my new pattern likewise into the device buffer. When I start the task I should see the first array from the PostHolding function and then the second array from the second function. And here is the problem I always see the array from the PostHolding function but not the second from the generatePattern(). I don't know where the failure is.

 

I have the same problem, when I call the PostHolding function (green in the picture) after the generatePatter() call. Here I see the signal from the generatePatter() function but not the signal from the PostHolding function.

 

I hope someone can help me?

 

Best Regards


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>