Re: mapping memory to labview arrays

Hi,

thanks for the reply.  I've copied into array's in the past, so I know 
how to do that.  My application is running at around 1 mbyte/sec, so the 
system may cope at that rate (I haven't tried it yet) but, the 
application will scale up to to many channels/pci board and multiple 
boards.  So I may need to look into changing the driver to move the 
target memory around...

Thanks


tim.ousley_at_ni.com wrote:
> LabVIEW tracks its own memory usage, so changing the handle to point to a
> non-LabVIEW memory area will probably cause LabVIEW to crash the next time
> that array is internally copied, freed, or resized.
> 
> Another way to do this is to pass a LV array to the driver, lock the memory
> pages, and DMA directly into that.
> 
> Copying data is usually pretty fast compared to the speed of MIO boards, so
> you will probably be able to keep up with your DAQ board even without a
> zero-copy design.
> 
> Tim Ousley
> Multifunction DAQ Software
> National Instruments
> 
> Have you seen the Measurement Hardware DDK for LabVIEW?
> http://sine.ni.com/apps/we/nioc.vp?cid=11737&lang=US
> 
> 
> 
>                                                                                                                  
>                       Ian A Smith                                                                                
>                       <ias_at_roe.ac.uk>          To:       comedi_at_comedi.org                                       
>                       Sent by:                 cc:                                                               
>                       comedi-admin_at_come        Subject:  mapping memory to labview arrays                        
>                       di.org                                                                                     
>                                                                                                                  
>                                                                                                                  
>                       09/02/2003 08:12                                                                           
>                       AM                                                                                         
>                                                                                                                  
>                                                                                                                  
> 
> 
> 
> 
> I have a pci dma input card which writes data to memory.  I'd like that
> data to end up in a labview array without copying it there.  I can't
> change the area of memory the i/o card uses.
> 
> Can I change the handle of a labview array to point to the memory area
> used by the i/o card?
> 
> TIA
> --
> Ian A Smith               Telephone: +44 (0) 131 668 8255
> Royal Observatory         Fax:       +44 (0) 131 668 1130
> Blackford Hill            Web:       http://www.roe.ac.uk/
> Edinburgh
> EH9 3HJ
> UK
> 
> 
> 
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
> 
> 
> 
> 


-- 
Ian A Smith               Telephone: +44 (0) 131 668 8255
Royal Observatory         Fax:       +44 (0) 131 668 1130
Blackford Hill            Web:       http://www.roe.ac.uk/
Edinburgh
EH9 3HJ
UK

Received on 2003-09-02Z13:18:35