LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Output timing

 Dear community,

 

I have a problem that may be related to my previous post (Problem with the generation of time-varying analog output signals ). The signal generation works as expected, but unfortunately the expected times do not match the measured ones at all. With the MyDAQ the signal on the x-axis is a factor three slower than expected, and for output via an NI PCIe-6341, the signal is way too fast. The triangular pulse should be 17ms wide.

SCR08.PNG

 

As soon as I want to activate the onboard clock in combination with the MyDAQ to solve this problem I get the error message that the output of finite samples is not possible with buffer and the MyDAQ cannot execute signal sequences without buffer. With the NI PCIe-6341 there is no error message regarding the execution without buffer, but the number of output samples is constant at 0, as soon as the clock is activated.

 

How can I adjust the output times correctly?

 

Many greetings

Josi

0 Kudos
Message 1 of 6
(729 Views)

I think the reason no one can help, is because there is no code in your post. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 6
(689 Views)

oh no, not again... thanks for the hint, i overlooked that the code was not uploaded. Here it is

0 Kudos
Message 3 of 6
(681 Views)

@J0SI wrote:

oh no, not again... thanks for the hint, i overlooked that the code was not uploaded. Here it is


Ok, there are many issues here. How many times do you expect the outer loop to run? Do you really want to re-configure, start, stop and clear the DAQmx nodes in each loop? Why do you need to change the allocate buffer settings? 

 

I might suggest navigating to the examples in: 

help/find examples 

 

Then search for daqmx and you can find many examples. like the Voltage - continuous output vi.

snip.png

This will give you a good starting point on how to configure DAQmx and call DAQmx operations. 

 

This VI does not do exactly what you want, but you can start here to verify functionality, then modify this VI to suite your needs.  

 

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 4 of 6
(660 Views)

I have updated the DAQmx nodes in the outer loop so that I can restart the output properties without stopping the whole VI to test the output under different parameters. But this adjustment should only be done once per pressing the update buttons. I have now removed this outer loop, because it will not be used in the later program.

 

I have adjusted the buffer settings, because these configurations were recommended for the output of a changing voltage output.

 

Thanks for the suggested example. This signal output works for me and I used it for the original variant of my VI. However, I now need the output of a continuously varying signal, which I currently generate by combining the data from the two arrays. This does not seem compatible with the continuous output, since here the signal courses must be known in advance, or have I understood this wrong?

0 Kudos
Message 5 of 6
(620 Views)

@J0SI wrote:

I have updated the DAQmx nodes in the outer loop so that I can restart the output properties without stopping the whole VI to test the output under different parameters. But this adjustment should only be done once per pressing the update buttons. I have now removed this outer loop, because it will not be used in the later program.

 

I have adjusted the buffer settings, because these configurations were recommended for the output of a changing voltage output.

 

Thanks for the suggested example. This signal output works for me and I used it for the original variant of my VI. However, I now need the output of a continuously varying signal, which I currently generate by combining the data from the two arrays. This does not seem compatible with the continuous output, since here the signal courses must be known in advance, or have I understood this wrong?


Great!, now is the point that you can leverage the parallel nature of LabVIEW. What you need to do is establish two parallel executing loops in a 'producer consumer' paradigm (google it). Generate the data in the producer and send the data to the consumer to be written out to the DAQ. Use a queue to send data between the two loops (google labivew QMH). Here is a skeleton of the code based on the previous code you sent: 

 

snip.png

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 6 of 6
(595 Views)