Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

estimate memory used HSDIO PXI-6552

Hi all,

 

I m now using PXI-6552 (8Mb/Channel) and I need to estimate the memory size which will be consumed to determine wheather the onboard memory is adequate. 

 

Here let me share with you all what NI article has tell me so I could point you to my real question. 

 

As I know, 

 

For 6552, memory perchannel = 8Mb (Total available channel = 20)


Data Width determine the memory size applicable to each channel.
If Data Width = 1 byte, memory perchannel for 6552 is 32Mb/ch.

And Data Width is determine by the channel used and each card.
use 1-8 Channels = 1 byte Data Width  (32Mb/ch)
use 9-16 Channels = 2 byte Data Width (16Mb/ch)
>16 - 20 Channels = 4 byte Data Width (8Mb/ch)

Channel Used => Data Width => Waveform Size allow
http://digital.ni.com/public.nsf/allkb/E5170A54988EF81A8625725A006103BB

But, waveform and hardware script is stored together. Number of waveform repetition and number of sequence will determine total memory size consumed.
http://zone.ni.com/devzone/cda/tut/p/id/3674


For a 8MB Onboard memory, 





So, can some1 tell me the way to calculate the memory consumption by considering the waveform repeti...

Message Edited by engwei on 10-15-2008 04:00 AM
0 Kudos
Message 1 of 11
(4,857 Views)

Hi Engwei,

 

I just wanted to mention that in the KB here, it does mention that for Generation sessions the data width for the 6552 is always 4 bytes.  The amount of onboard memory used by the 6552 is a combination of both the waveform and the script file.  An estimate of the waveform size can be calculated using the formula provided in the article here.  There is a small amount of memory used for buffering, but this value should be very small in comparison.  It also mentions that "most scripts use very little memory (on the order of 1000 samples)."  Typically the script sizes are much smaller than the waveform size and are considered negligible.  The driver takes the script and converts it so it can be sent to the onboard memory.  Currently, there is no official way of calculating the exact size of the script.  Is there a specific reason you are worried about the script size.  If you post your application information, there might be another option or workaround.  If you are getting closed to filling up the onboard memory, you might want to consider methods of reducing the waveform size mentioned in the article here.  More options would be to consider purchasing device with more onboard memory or streaming the data from file rather than from onboard memory.

 

I hope this helps,

Paul C. 

Message Edited by Paul C. on 10-21-2008 07:30 PM
0 Kudos
Message 2 of 11
(4,793 Views)

Hi Paul C. ,

 

Thanks for your time. To conclude my understanding, 

 

For PXI-6552, 

 

generation data width is fix at 4 bytes, hence 8Mb/Channel is fixed. 

and from http://zone.ni.com/devzone/cda/tut/p/id/7283

"A single instruction compiled for the National Instruments High Speed Digital I/O boards is 16 bytes. "

 

  • Generate statement
    •  No markers
      •   1 instruction
    •   N markers
      •  N+1 instructions
    • Subsets
      •  1 Instruction
  • Wait statement
    • 1 instruction
  • Clear trigger statement
    • 0 instruction
  • Repeat Loops
    • Repeat n loops
      • 2 instructions

 

 

So, Total onboard generation memory for 6552 is 8Mb*20channels = 160Mb = 20MB.

 

For  hardware script is

 

script Myscript

repeat 10              (2*16 bytes)

generate wfm0     (1*16 bytes)

end repeat

end script

 

if wfm0 is waveform with 800k samples (800k line of samples(rows) and 20 Channels(column)

size of wfm0 = 800k*20=16000kb = 16Mb = 2MB

 

from script, memory consumed = 3*16bytes = 48bytes = 48B

 

So, I can say that the total memory used in generation session = 2,000,048B. 

 

Am I correct ? Please comment. Thanks a lot. 

 

 

0 Kudos
Message 3 of 11
(4,784 Views)

Hi Engwei,

 

You're very close to the correct aproximation. There is some additional memory used for buffering / padding etc, but again this is extremely small in comparison to the waveform (just like the script size).  In addition, I do want to reinforce the fact that the 16 bytes is an aproximation and 100% exact.

 

I hope this helps,

Paul C. 

 

Message 4 of 11
(4,755 Views)

Hi Engwei,

 

I meant to say NOT 100% exact.  Sorry about the mistake.

 

Regards, 

Paul C. 

0 Kudos
Message 5 of 11
(4,751 Views)
Ok, thanks a lot. At least I got the correct way to estimate the memory used. Thanks for your time !!
0 Kudos
Message 6 of 11
(4,742 Views)

But my question is :

 

      If you have 800k samples and 20 channels, you can say you will have 800k*20 samples, not 800k*20 bits. Because NI card can support 0,1,Z,H,L,X, 3bits are needed for 1 sample. Thus, the memory will be 800k*20*3 = 48Mb = 6MB.

 

Is this correct? And I wonder what is maximum memory for script?

 

 

0 Kudos
Message 7 of 11
(4,725 Views)

Keep in mind that the memory is specified in Mb per channel.  If you have a 6552 with 1Mb per channel memory, and you store 800K samples, you've only used 800K/1M samples.  You'd still have approximately 200K samples available in your memory.

 

Do you need to know exactly how many bytes are being stored in the onboard memories, or are you just wanting to estimate how many data points you can store at any given time?

 

Keith Shapiro

National Instruments R&D

Message Edited by Keith.Shapiro on 10-24-2008 10:55 AM
Message 8 of 11
(4,713 Views)

AhGang,

 

You do not actually lose any pattern depth by using the other logic states.  The 8Mb per channel memory option, for example, will have 8Msample of memory behind each channel, regardless of encoding (1,0,H,L, etc).  Paul's point is that you lose some of the sample depth since we share memory between data and instructions.  You're total script size PLUS waveform depth must fit within the 8Msample deep memory.  So for your example below if your waveform is 800k deep then you are using 800k + (scrippting overhead documented at http://zone.ni.com/devzone/cda/tut/p/id/7283) samples of memory where you have 8Msamples available.

Message 9 of 11
(4,708 Views)

OK. Understood.

 

Thanks for the clear answer.

 

 

0 Kudos
Message 10 of 11
(4,668 Views)