06-15-2023 09:58 AM - edited 06-15-2023 10:03 AM
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.
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
06-16-2023 07:38 AM - edited 06-16-2023 07:38 AM
I think the reason no one can help, is because there is no code in your post.
06-16-2023 07:47 AM - edited 06-16-2023 07:47 AM
oh no, not again... thanks for the hint, i overlooked that the code was not uploaded. Here it is
06-16-2023 02:23 PM
@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.
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.
06-19-2023 03:56 AM
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?
06-19-2023 10:34 AM
@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: