Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DMA with NI PCI-8431/8 card

I am using NI PCI-8431/8 - high performance 8 port Serial interface for PCI, I am using NI-VISA to configure and control the card.

 

Card has capability to implement DMA (direct memory access).

 

How can I use DMA property. Could you point me how to configure PXI0::MEMACC, and sample code,

 

Regards,

0 Kudos
Message 1 of 6
(4,082 Views)

Hi temucin,

 

You will not need to do any additional configuration to use the DMA features of the 843x devices.  The drivers will automatically take advantage of the DMA capabilities of NI-Serial devices.  The VISA drivers do provide a setting to allow DMA usage, but this will have no effect on NI-Serial devices since it is done automatically.  This article provides some information and a basic example of how you can communicate to a device over serial using VISA.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
Message 2 of 6
(4,071 Views)

Thanks for your reply,

 

After opening a session to the device, as you also wrote The VISA drivers do provide a setting to allow DMA usage for that session by using the following code.

 

status=viOpenDefaultRM (&defaultRM);

status = viOpen (defaultRM,"ASRL9::INSTR", VI_NULL, VI_NULL, &instr);

status = viSetAttribute(instr , VI_ATTR_DMA_ALLOW_EN , VI_TRUE);

 

Is it enough to use the DMA capability of the serial card?

 

In the NI_Visa Help It is written that viRead and viWrite functions reads and writes data from/to device, However viMove moves a block of data ( as DMA does). Should I use viMoveXX functions for DMA read/write instead of using viRead and viWrite? Should I do any preperation for a DMA operation?

0 Kudos
Message 3 of 6
(4,061 Views)

Hi temucin,

 

It is not necessary to set the VI_ATTR_DMA_ALLOW_EN attribute for the 843x devices.  DMA access on these devices is handled completely by the drivers so you will be able to take advantage of this capability by simply using VISA Reads and Writes without any additional preparation.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 4 of 6
(4,056 Views)

I could not get the following baudrates, 230400, 460800, 921600, 1048576.

Do I need to make any special setttings?

 

Thanks,

0 Kudos
Message 5 of 6
(4,051 Views)

Hi temucin,

 

Please see the following 2 articles for information on support baud rates and configuring them using VISA.  You should just need to specify these baud rates for the device in your code.  Accuracy specifications and maximum rate information is also given.

 

Baud Rate Capabilites for NI Serial Products

Serial Baud Rates Supported By NI-VISA

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 6 of 6
(4,043 Views)