03-09-2011 05:23 PM
I am very stuck. I have seen this done before, so I know it's possible. I was working from the example finder: -hardware input and output - daqmx - analog generation - voltage - cont gen voltage wfm-int clk-non regeneration.vi
I have a device I need to turn on ever 5 seconds, it requires a +4 V signal to turn and the digital IO won't work (not enough current).
I altered the VI so that could generate a square wave at a low enough frequency that it would turn my device on, then the progam would end. I then tried to put this in a while look with a 5000 ms delay, but every time I tired to put it in a loop it generated an error. I pasted the error below, but woudl like to note that I tried the recommended aids and it did not help.
I am a novice, I have tried a few other things as well with no luck... any advice would very appreicated to get this vi to work, or create a new one.
Here is the error:
Possible reason(s):
DAQmx Write failed, because a previous DAQmx Write automatically configured the output buffer size. The buffer size is equal to the original number of samples written per channel, so no more data can be written prior to starting the task.
Start the generation before the second DAQmx Write, or set Auto Start to true in all occurences of DAQmx Write. To incrementally write into the buffer prior to starting the task, call DAQmx Configure Output Buffer before the first DAQmx Write.
Task Name: _unnamedTask<32>
03-10-2011 04:24 PM
Hi Steven,
This sounds like it'll be a pretty quick fix. The simplest way to resolve this issue would be for you to post a screenshot of your code and the code itself and I'll take a look at it.
Regards,
03-10-2011 04:53 PM - edited 03-10-2011 04:55 PM
Here is my code. As it is, it will turn my device on, then the program ends. The device will turn itself off some time later, and then i would like the program to execute again, say 1 minute later, but everytime I try to put it in a while loop with a 60000ms dealy, it generates an error. I thought maybe the delay was too long, but it wouldn't even work with a 1000ms delay.
03-11-2011 09:31 AM
Hi Steven,
Here's a simple implementation:
03-16-2011 11:59 AM
I keep getting this error:
Error -200462 occurred at DAQmx Start Task.vi:1
Possible reason(s):
Generation cannot be started, because the output buffer is empty.
Before starting a buffered generation, write data. Unreserving a task empties the buffer. Changing the size of the buffer or setting the Regeneration Mode property will result in the buffer being unreserved and emptied.
Task Name: _unnamedTask<0>
03-17-2011 11:55 AM
You're attempting to start sending data without writing anything to the output buffer. You'll have to write something to the buffer.
03-17-2011 02:20 PM
okay... that is pretty much exactly what the error message said, but doesn't help me at all.
03-17-2011 03:26 PM
How do you have your task configured? What channel are you writing to? Specifically, what physical channels are you writing to on the DaqMX Create Channel VI? Are you attempting to run the example code provided? If so, which settings did you change in it?
03-17-2011 04:22 PM
I tried to run the file the other gent provided:
03-21-2011 09:52 AM
Well, writing it to the buffer is essentially how you tell it to communicate. So in fact it does output whatever you tell it to, you just have to tell it in a way that it understands. In human terms, the buffer would be similar to where you store information in your mind between reading it here on the forums, and acting upon it in your LabVIEW program.
Also, when I run this software with a simulated card I'm not getting the error you're getting. You should verify that the device is installed correctly in the Measurement and Automation Explorer. Try running a Self-Test, and make sure that you're using the most up-to-date version of NI-DaqMX.
Newest Version: (9.2.3)
http://joule.ni.com/nidu/cds/view/p/id/2260/lang/en