LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Daqmx Function Generator

hi everyone,

 

I found an example from ni and I want to have it modified a little bit. I need to add delay before and after generating the sinewave in 1 channel, how to do that? Just simply delay, sinus, delay.

Then I need to have range of control for the delay (the delay can be 1ms ~ 1000ms), is that means I should use small buffer (1ms) to be able to vary the delay? (but seems buffer 1ms doesnt work).

Please help.

 

funcgen.png

 

regards,

yan.

0 Kudos
Message 1 of 5
(2,594 Views)

I could think of 2 ways. Use a sequece structure and add delay before and after signal generation. Other solution is create a delay subvi with error cluster and add it before and after signal generation vi.



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 2 of 5
(2,589 Views)

Hi,

I have been working on your request and I programmed a solution for you.

I hope it meets your expectations.

 

If you have any questions about the VIs, I'm at your disposal.

 

Best Regards!

0 Kudos
Message 3 of 5
(2,552 Views)

hi,

 

I really appreciated your VI, thanks for that.

 

I made my own VI already, a little different concept, but working.

 

You might know about error -200018:

 

"A DAC conversion is started before the data to be converted were available.

 

Decrease the output frequency to increase the period between two DAC conversions, or reduce the size of the output buffer to the data faster (faster) to write.

When using an external clock, check whether the signal contains noise or voltage spikes."

 

I got this error when I try to acquiring the generated signal at the same time I'm generating. Can't find any help or solution for that.

 

regards,

Yan.

0 Kudos
Message 4 of 5
(2,543 Views)

Hi Yan,

 

I've heard about that Error, yes. Its origin is based on a buffer-underflow problem.

But the solution depends on your configuration, LabVIEW programming and used systems.

 

I strongly recomend you to open a new Forum-Request, so your case can be resolved properly.

 

Best Regards!

0 Kudos
Message 5 of 5
(2,540 Views)