03-03-2016 02:39 AM
Hello,
I´m trying to synchronize a digital output signal (in the end it should be a short TTL pulse) to an analog output. With this I want to tag the beam position change. I the already existing program there are the detector counters already synchronized (counter inputs) and this works, Adding in the same manner the digital output leads to the following error:
Error -200462 occurred at DAQmx Start Task.vi:4
Generation cannot be started, because the output buffer is empty.
Before starting a buffered generation, write data. Unreserving a task empties the buffer. Changing the size of the buffer or setting the Regeneration Mode property will result in the buffer being unreserved and emptied. Changing the Sample Mode or configuring retriggering also empty the buffer.
I use an PCIe 6343 device with a Windows 7 32-bit computer.
What´s my error?
I attached the VI.
Thanks a lot!
03-03-2016 02:24 PM
I can't open your attachment currently (computer trouble on my end), but I would put money on the fact that you need to write to the buffer before you start the task.
If you're just writing static data, move the DAQmx Write function before the DAQmx Start.
If you're going to update what is written, just add an extra DAQmx Write before the Start.
I image you have it set to trigger immediatly as well, so if you set a trigger and then write before the trigger signal comes, that would work as well.
-Jim
03-04-2016 09:45 AM
Thanks for your hints. Beside the fact, that the synchronisation of the TTL pulse has to me made outside the loop (only one line and not 4 counters), I generate now an output buffer and there is no longer an error message, BUT:
1. The TTL pulse only occurs once at the start of the acquisition (first pixel) and not with every change of the AO value of the beam position. This I still do not understand. I aim to tag every beam position change in the Scanning Electron Microscope with a short pulse output.
2. If I look at the TTL pulse in the oscilloscope, I have the impression, that "dt" in my "Build waveform.vi" does not determine the pulse length. It´s much wider. How can I handle this? Are these short pulse lengths possible with the PCIe-6343 device?
I attach again the revisited sub-vi. Thanks for every help!
03-10-2016 01:23 AM
Hello,
I´m back in the office again and still I have no real idea how to handle the two aforementioned problems...
Thanks!
04-05-2016 04:14 PM
Hmmm, how does digital output task even work... you do not write data to generate, but start task. Does setting zero length of the buffer help? It does not have data to generate, starts and immediately stops the task. Then DAQmx write has autostart - it starts task one more time and generates data. Mr. Frankenstein?
>> pulse width
Digital output is capable up to 1 MHz according to the specs, also its timing is determined by sample clock Rate. Waveform takes only data.
>> single pulse
Digital output task starts once, nobody says it should restart. I am not sure if trigger propery Start -> More -> Retriggerable is supported for this board for digital output tasks.
Use counter output instead of digital output: implicit (counter) sample clock, finite generation, 1 sample to generate, set retriggerable start trigger.
It is capable down to 20 ns pulse width (2 ticks with 100 MHz clock).
04-22-2016 06:51 AM
Hello and thanks for your answer!
Output.BufSize is already set to 0.
If I use the retriggerable option, I get error 201320:
Possible reason(s):
Retriggering can only be enabled for finite task with a Start trigger configured.
As you can see in this entry in the Labview submenu, it is retriggered without this option, but only every forth time independent of dwell time on a pixel:
http://forums.ni.com/t5/LabVIEW/synchronization-TTL-pulse-to-analog-output/td-p/3267025
I would like to use one of the counters, but they are already occupied...
Looking for further help!
Thanks in advance!