Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Data Generation Problem using Finite output samples

Guys,
 
I am using DAQmx C++ libraries to control a 6537 High speed 200Mbit card for a
data generation task.  I am having a problem with the timing of the data generation.
My task sequence is as follows:
 
1. Wait for trigger
2. Generate a 32byte packet of data
3. Wait for trigger
4. Increment buffer pointer by 32 and repeat step 2
 
My solution was to use Finite data generation
And this works but I have to call DAQmxStopTask in my generation loop
to reset the trigger etc.  The process of restarting the task is around 200us
on my computer, but my trigger pulses are at 40us.  So I need to figure out
a way around calling StopTask.  I tried setting the timing to continuous
generation mode, but in this mode the card is not waiting for triggers
(or at least I could not figure out a way to make it wait). 
 
Any help or suggestions are welcome!
 
 
0 Kudos
Message 1 of 6
(4,153 Views)

Hi Devnull,

The PCIe-6537 is a basic card and was not designed to be retriggered; it will only support a start trigger.  There are two workarounds for this application.  The first method is to create and stop the task every time you receive a trigger.  This method should take longer than the time in between each trigger. 

The second method is to create a retriggerable counter task on another board.  When you receive a trigger, the counter will output a predefined pulse train at a specific frequency.  This signal can then be routed to the PCIe-6537 and used as the sample clock.  This method will not work for your application because you are writing different data every time you receive a trigger. 

 The reason that this card does not support retriggerable generation is due to the driver (NI-DAQmx).  If you use any of the other HSDIO boards, they would support this functionality.  Unfortunately they are not available for the PCIe bus.

Respectfully,

Rob F
Test Engineer
Condition Measurements
National Instruments
0 Kudos
Message 2 of 6
(4,123 Views)
Hey Robert,

Thanks for the info about NI DAQmx. The card has been performing well, but I am still interested in getting a card that will support hw re-triggering. Can you suggest a card that will have this feature? I need 3 chan of output at 40Mhz. Do I have to go to PXI?

Thanks,

Leo
0 Kudos
Message 3 of 6
(4,003 Views)
 
 

Hi Leo,

The PCIe-6537 is capable of hardware re-triggering with a little bit of work. A counter board such as the PCI-6602 can be used to add this functionality to your PCIe-6537.

The basic scheme is the counter board will use one counter as a re-triggerable finite pulse generator, when active this will gate on a second
counter that will output a 40Mhz signal. This 40Mhz will then be used as the sample clock for the PCIe-6537. The PCIe-6537 does support a non-free running clock in Sample Clock mode. See the NI-6536/37 help documentation, search for Choosing a Sample Timing Type for your Application.

This would be the low cost solution to hardware re-triggerable generation with the PCIe-6537.

The PCI-6541 is really worth a look at too. It is the entry level to NI-HSDIO devices, these provide tools like scripting. Take a look at the help file for the HSDIO series, it's here. In particular, look at the Programming->Programming Flow->Generating Dynamic Data section.

Please post back if you have any questions.

Have a great evening!

MatthewW
Applications Engineer
National Instruments




 

Message Edited by Matthew W on 08-02-2007 10:44 PM

0 Kudos
Message 4 of 6
(3,983 Views)
Matt,

Thanks for the help. My application requires me to spit out a multi megabyte data file in packetized format. The packets are formed based on an input trigger that has the worst case of 40us 25kHz.

I wish the 6602 was the answer, but, I have some reservations about the 6602 because it also used NI-Daq and hence does not appear to have a hw retrigger for a finite sample generation. In other words if I dont see a way to use the 6602 to generate a clk to the 6537 in such a way that I could bypass the sw timed

for number of frames to send
Start Task -> Wait Until Done -> Stop Task

finite sample generation which is still going to have a dependency on sw timing ie Windows/NIDaqmx to run the above loop. With the 6537 the above loop can respond to
input triggers not less than 300us (on the Dell XPS E6600) and I need to respond to triggers of 40us - hence a hw retrigger solution is the only way to go. I hope to look at the HSDIO driver to see if it can handle this feature.

Any way you guys can send me the HSDIO driver for the 6537:)
0 Kudos
Message 5 of 6
(3,978 Views)

 Hi DevNull,

 The re-triggerable solution using a 660x board is a hardware timed operation. There is no Task stopping/starting required for this to work.

 Here is a DAQmx example for re-triggerable analog acquisition that uses a counter card to enable the re-triggerable functionality.

 The 6602 has a minimum input pulse width of 6.25nS... There should be no problem seeing the 40uS pulse as a trigger to begin data generation!

 The PCIe-6537 uses NI-DAQmx drivers, not the HSDIO drivers... If you would like to check them out, they are located here.

 Have a great evening!

MatthewW
Applications Engineer
National Instruments



0 Kudos
Message 6 of 6
(3,953 Views)