Discussion:
Using 6534 for repeated pattern
(too old to reply)
charles hamm
2007-10-05 14:40:12 UTC
Permalink
I am trying to use a PXI-6534 to output a 16-bit repeated pattern initiated by an external trigger. My environment is:Win 2000 SP4Visual C++ 2005 (V8)NIDAQ Legacy V7.4.2I can successfully operate the 6534 by reloading the pattern buffer each time, using the same code that worked for the 6533. However, when I modify the code to preload the pattern, the pattern is never output. Since there does not seem to be any example code that addresses this application, I am posting this message.The code that works is similar to this (less error detection):Init_DA_Brds(mwPatternDevice, &wBoardCode);DIG_Grp_Config(mwPatternDevice, mkwPatternGroup, 2, 0, 1);Set_DAQ_Device_Info(wPatternDevice, ND_DATA_XFER_MODE_DIO_GR1, ND_UP_TO_1_DMA_CHANNEL);  Set_DAQ_Device_Info(wPatternDevice, ND_DATA_XFER_MODE_DIO_GR2, ND_UP_TO_1_DMA_CHANNEL);  DIG_Block_PG_Config(mwPatternDevice, mkwPatternGroup, 1, 0, mwStimBase, mwStimCtr, 1);DIG_Trigger_Config(mwPatternDevice, mkwPatternGroup, 1, 0, 0, 0, 0, 0, 0);loop:DIG_Block_Out(mwPatternDevice, mkwPatternGroup, mpwPattern, mwPoints);do { // while jRemaining    <wait for external trigger via other hardware>    DIG_Block_Check(mwPatternDevice, mkwPatternGroup, &jRemaining);  if (iStatus != noTransferInProgError)     NIDAQYield(1);    } while (jRemaining && mbRunning);goto loop;The code as modified for the 6534 looks like this:Init_DA_Brds(mwPatternDevice, &wBoardCode);
DIG_Grp_Config(mwPatternDevice, mkwPatternGroup, 2, 0, 1);DIG_Block_PG_Config(mwPatternDevice, mkwPatternGroup, 1, 0, mwStimBase, mwStimCtr, 1);
DIG_Trigger_Config(mwPatternDevice, mkwPatternGroup, 1, 0, 0, 0, 0, 0, 0);

DIG_Block_Out(mwPatternDevice, mkwPatternGroup, mpwPattern, mwPoints);
loop:do { // while jRemaining
    <wait for external trigger via other hardware>
    DIG_Block_Check(mwPatternDevice, mkwPatternGroup,
&jRemaining);  if (iStatus != noTransferInProgError)    
NIDAQYield(1);
    } while (jRemaining && mbRunning);
goto loop;Note that I removed the transfer mode calls and moved the block_out call to outside the loop. The loop runs, but the pattern is not actually output from the board.
ryan_d
2007-10-08 22:10:09 UTC
Permalink
Hi Rick M,


The data transfer rate from you card to your computer?s
memory or hard drive is going to be largely dependent on the speed of your bus.
The data transfer rate (per channel) and the size of your card?s FIFO buffer
can also have an effect on your transfer rate, but only if you are sampling
slower than you bus speed. For example, PCI bus speed is 133 MB/s (shared). The
6533 has a maximum data rate of 80 MB/s (20 MHz maximum sample rate * 32
channels / 8 bits/byte). Since this is below the maximum rate of the PCI bus,
you will not be able to transfer data any faster than you can sample it. The
6541 has a maximum data rate of 200 MB/s (50 MHz maximum sample rate * 32
channels / 8 bits/byte). The PCI bus is now the limiting factor, making the
fastest data transfer rate 133 MB/s. This is assuming that nothing else is
using the PCI bus (another card). This is
also why the 6533 has different memory options.


If you?re looking for something even faster, PCI Express
offers a bus speed of 2.5 GHz. The <a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/202770" target="_blank">PCIe-6537</a> also has a maximum data
rate of 200 MB/s and is not hindered by the bus speed.


Please post back if you have any more questions. Have a
great day!
ryan_d
2007-10-09 00:10:14 UTC
Permalink
Hi Charles Hamm,


In order to repeatedly generate the same block of data, you
must set ND_PATTERN_GENERATION_LOOP_ENABLE
in the Set_DAQ_Device_Info function to
ND_ON. There are a couple
restrictions when looping from the onboard memory. If you are using 8-bit data,
the buffer size must be a multiple of 4. If you are using 16-bit data, the
buffer size must be an even number. There are no restrictions for 32-bit data.


This information can be found in the <a href="http://www.ni.com/pdf/manuals/371464d.pdf" target="_blank">NI 653x User Manual for
Traditional NI-DAQ</a> at the top of page 2-12.


Please post if you have any questions. Have a great day!

Continue reading on narkive:
Loading...