07-01-2010 02:10 PM
Hello, I am having trouble outputting a continous waveform (custom multlisample channels) when a TTL - like 5V 0V trigger is applied to PFI0. The trouble is although the timing source runs continously, when the digital voltage line is connected I get only one waveform sent out, as opposed to a continous regeneration of the same waveform.
I have been working with some conditional loops, but to no avail, is there a solution that can provide two triggers ( one for a pulse train) and then for the digital falling edge (on at 0V) that can allow for regeneration of the AO write?
Thanks,
DB.
Solved! Go to Solution.
07-02-2010 11:17 AM
Hi DB,
A good example for this application is a DAQmx shipping example in LabVIEW. In LabVIEW, navigate to Help»Find Examples»Hardware Input and Output»DAQmx»Analog Generation»Voltage»Cont Gen Voltage Wfm-Int Clk- Dig Start.vi.
You can choose to specify an external clock if you would like by right-clicking on your source input to the DAQmx Timing and selecting Create»Constant. You can then specify where you bring in the external clock. By default, it will use the onboard clock of your DAQ card to create a pulse train. This example uses the parameters of the waveform to drive the sample clock timing.
What NI DAQ hardware are you using? By default, the card will store the waveform you wish to output otno the FIFO of the board, and regenerate the the waveform until you press the stop button. Does this help?
Best,
07-06-2010 09:48 AM
Vaguely it is helping, I'll try to be more specific. Essentially, I have a 40Hz pulse train coming into a PFI counter (using BNC-2110) into my DAQ card (PCI-6221) as my 'timing source'. I want to program to start sending the analog output waveforms only when a 5V-0V trigger is at 0V and continuously generates the output unless the trigger is no longer at 0V. (Should I use my second BNC PFI line?) The problem I am getting is that the trigger at 0V only allows for one waveform packet to be sent, in other words, there is a single pulse sent out not a continuous waveform pattern. It can't seem to get both a timing solution and a continuous generator when both the digital edge and the 40hz source are being used as triggers/timing respectively.
Thanks,
DB
07-06-2010 11:58 AM
You have some DAQ setting wrong. On the DAQmx Timing function, there is a setting for sample mode, which you can set to Continuous Samples. Attach your vi or a sample of the part you are having trouble with.
07-07-2010 08:14 AM
Here is the VI. I hope this helps. I want the Scan Rate edge to line up with the falling trigger edge to 0V and turn on and run continuously until/if the trigger 'voltage' level goes back to 5V.
Thanks,
DB.
07-07-2010 09:48 AM
Hi DB,
I recommend using a pause trigger. This will allow you to output when a certain TTL level is high (or low) and not output when the opposite is true. Here is an example that demonstrates pause triggering using DAQmx property nodes.
You will need to change the sample clock timing to continuous for this example, as well as modify the data to be written to fit your application.
You can leave the initial value write to the analog output channel if you would like, or you can remove the initial write, start, and stop DAQmx functions. Either will work.
Best,