Discussion:
"Burst Mode pattern Generation" ??
(too old to reply)
Raminta
2007-06-26 21:40:12 UTC
Permalink
"burst mode pattern generation"   ---  is there a difference between this and "regular" burst mode ?  I have an application in which I need to ~continuously~  output  multiple streams of data, where each 'stream of 32-bit values' is output using the burst mode protocol. 
 
For example, suppose I have 10 separate arrays of data. Each array contains 100 integers. My programs needs to continuosly output array1, followed by array2, ...followed by array5, then back to 1 through 5 again, over and over and over. Each individual array of 100 integers is output using burst protocol.  I was thinking of just calling DIG_BLOCK_OUT() in an infinite while loop, and each iteration of the while loop outputs a single array with a single call to DIG_BLOCK_OUT().  So pseudocode might look as follows:
 
while (forever)
{
     call DIG_BLOCK_OUT() ;   // call for either array1, 2, 3 , 4 or 5
}
 
But is there a different way  other than what I have above ?
 
Thanks in adance !
 
****** I am using the AT-DIO-32HS card
Raminta
2007-06-27 21:10:14 UTC
Permalink
Thanks so much for your reply. I still have a few questions remaining:
In the example file, DOsingleBufBurstHandshake653x.c, the general programming is as follows:
 
1. call DIG_Grp_Config (configure groups of ports as output, with handshaking)
2. call DIG_Grp_Mode (configure the handshaking parameters)
3. call SET_DAQ_Device_Info (setup for internal PCLOCK)
BEGIN WHILE (forever)
4a. DIG_Block_Out (initiate the burst transfer of a single buffer of my data)
4b. DIG_Block_Check (check if burst transfer complete...this is not a necessary step)
ENDWHILE  (does it go here ???....)
5. DIG_Block_Clear (clear the block operation)
ENDWHILE  ( -OR- does it go here ???....)
6. DIG_DAQ_Device_Info (restore default PCLOCK direction)
7. DIG_GRP_CONFIG (unconfigure group)
QUESTION: since I want to output a continuous stream of buffers,  should my BEGIN/END WHILE stamement include the call to DIG_BLOCK_CLEAR or not ?
IN response to your last reply, I am actually more worried that I will not be able to output 2 consecutive buffers quickly enough.I am worried that the call to DIG_Block_Check() will slow down my program. I need to output consecutive fixed-length buffers (in a continuous WHILE loop) in a very specific time period, where each individual buffer is output using the burst protocol. So I am just , for now, trying to make sure that I am configuring the card correclty to begin with.
 
Thanks very much !!!!!!!
 
Kenn N
2007-06-27 23:10:14 UTC
Permalink
Hey Ramina,The manual says:"After Traditional NI-DAQ (Legacy) starts a block transfer, you
must call DIG_Block_Clear before Traditional NI-DAQ
(Legacy) can initiate another block transfer. Notice <a href="dig_block_check.html" target="_blank"> DIG_Block_Check</a>
makes this call for you when it senses that Traditional NI-DAQ (Legacy) has
completed a transfer. DIG_Block_Clear does not
change any current group assignments, alter the current handshaking settings, or
affect the state of the pattern generation mode."So I would call that in the while loop, and possibly have embedded loop checking to see if the transfer is finished before you call it.&nbsp; The manual is not clear as to whether the DIG-Block_Clear will wait until the transfer is complete before it is called, so you may need to call explicity control when it is called. The last sentence of the manual seems to imply that it will, but I'm not certain.&nbsp; I'd have to do some more research, but the easiest way would be to just try it, so go ahead and do that.Most of your concerns are system specific so your best bet is to try it and see what happens.Regards,
Loading...