From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Analog Output Buffering"

Solved!
Go to solution

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!

0 Kudos
Message 1 of 7
(2,994 Views)
The VI you mention was part of the obsolete traditional DAQ driver.

Why don't you explain what you want to do? Also, what DAQ device do you have?
0 Kudos
Message 2 of 7
(2,990 Views)

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!

 

0 Kudos
Message 3 of 7
(2,985 Views)

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.

0 Kudos
Message 4 of 7
(2,975 Views)

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!

0 Kudos
Message 5 of 7
(2,917 Views)
Solution
Accepted by topic author Claude2

Why spoil things by connecting the button to something?Smiley Very Happy

 

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.

0 Kudos
Message 6 of 7
(2,906 Views)

It works! 

I appreciate your help very much!

Thanks!

0 Kudos
Message 7 of 7
(2,902 Views)