09-09-2013 09:32 AM
I'm newbie to Labview..... and it is very difficult to find good help and tutorials ... it is really disapointing.
I want to find a good, simple example of "Analog Output Buffering"....
I found these "words" somewhere on the internet in the "DAQBasic.pdf" file.
It is mentioned I need "Easy VI", but I do not find something like "Easy VI" in the available functions.
There is way too much info everywhere and there is no structure...
How can I do "Analog Output Buffering"?
And please, I want simple examples....
Thanks!
Solved! Go to Solution.
09-09-2013 09:44 AM
09-09-2013 09:59 AM
I have DAQ-9178. I want to generate an output on NI 9263. The output is an array of 1000 samples.
On a button press I want these samples to be output at a certain rate. Outside of this timeframe, the voltage output should be zero.
The 1000 samples are read from a file which can be selected.
I have put the "button" in a loop so that it is checked continuously. When the button is pressed, the file with data is read, prepared and send to the DAQ assistant.
I had to set the DAQ assistant timeout, if I set it to 10" and there is no new data available, an error occurs after the 10".
If I set timeout to -1, then it keeps "hanging" and waits infinitely.
I definately has to do something with "where" and in "what loop" I need to place everything.
Thanks!
09-09-2013 10:27 AM
That sounds like a pretty simple operation. You don't provide your code so I have no idea how you are setting up the DAQ Assistant. I also have no idea what rate you want or the format of the file. I would suggest you look at the shipping examples. In 2012/2013, there is an example called Voltage - Finite Output. The output waveform is created by a software function generator but it can be easily replaced with a file read. The 9263 supports hardware timed analog output so a single DAQmx Write will output the waveform at the specified time between samples.
From your brief description, there should only be a single loop. A loop with a event structure monitors your start button.
09-10-2013 05:24 AM
Dera, thank you for your reply.
I looked into the "Voltage Finite Output.vi" and tried to change this to my needs.
I adapted the code, changing the Waveform generation by a simple array of for instance 16 values. This worked.
But I want to generate this "waveform" every time I press a "go" button, but I do not know where to connect this button to.
Do I need to place the generation code in a while loop?
See attached screenshot.
Thanks a lot!
09-10-2013 06:58 AM
Why spoil things by connecting the button to something?
Your code should be close to what you asked for. You want to make sure that there is no timeout event. I would use the value change event instead of key down. When started, the DAQ code will execute once and then after that, wait for the button press. Couple of different ways to fix that. One way is to simply place the DAQ code inside the event.
09-10-2013 07:10 AM
It works!
I appreciate your help very much!
Thanks!