Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffered Pattern issue on PCI DIO-32HS Card

Hi,

I have developed a program to continuously run a buffered loopback which configures 1 port as TX, transmits 1Mb of pattern at 2.5Mhz and reads back the same on another port. The code works fine when I use Ports 0 and 2. But I get an error -10403 at DIO Config.vi when I use the ports 1 and 3.

Do we have to use different group numbers for different combination of ports?

Attached is the VI which I used for my loop back test. Please let me know if I have to use a specific group numbers or whether I have to change any of the configurations.

Here are the list of versions I have used,

- LabVIEW version 6.0.2

- Digital Input/Output device PCI-DIO-32HS Driver Version : 6.9.1

OS : Windows NT

Regards,

Siddu

0 Kudos
Message 1 of 10
(5,130 Views)
Hello Siddu,

The behavior you are seeing is a result of the limitations of how the two timing engines present on the NI PCI-6533 (DIO-32HS) can be divided up between the four ports available on the card.  Depending on the size of the data being written or read (8, 16, or 32 bit samples), certain port configurations are allowable.  If you right-click on the DIO Config VI and select Help, the LabVIEW Help for the function shows the rules that apply for assigning groups to the PCI-653x digital ports.  You could potentially get around this limitation by writing and reading 16-bit samples to ports 0 and 2, and padding the first eight bits of each sample with zero's.  Besides that, its really just a limitation of how the driver interacts with the card's timing engines.

Regards,
Travis G.
Applications Engineering
National Instruments
www.ni.com/suppport
0 Kudos
Message 2 of 10
(5,119 Views)
Hi Travis,
 
So does this mean i configure Ports 0 & 1 as Output group and Ports 2 & 3 as Input group or Vice-versa and read or write 16-bit data? The card is supposed to operate at high speeds and has internal buffer. So why does the problem happen when i use only 1Mb data and clock rate of 2 Mhz.
 
Regards,
Siddu
0 Kudos
Message 3 of 10
(5,116 Views)

Hello Siddu,

There are two groups of timing/handshaking lines on your PCI-6533, so at most you can do two simultaneous operations.  Because these timing signals need to be divided up between your ports, there are only certain combinations of ports you can use when configuring two operations to take place simultaneously.  If you are performing two 8-bit read or write operations, the divide up of these timing signals dictates that you must perform these two operations on ports 0 and 2.  If you are performing two 16-bit operations, the first operation must combine ports 0 and 1, while the second operation must combine ports 2 and 3.  Because of the limit on the number of lines, you can only perform one 32-bit operation, which will only use one set of timing/handshaking lines and ports 0,1,2, and 3.  So, if you want to perform two operations, one involving port 1 and the other involving port 3, the only way to do it is to do 16-bit operations and ignore the data being read/written to ports 0 and 2. 

This separation of timing duties should not affect the performance of your card, but for future reference, the PCI-6533 only has a 16 word FIFO (onboard buffer), so your application it is actually quickly transferring data to and from your PC's system memory (RAM).  The PCI-6534 comes with two 32 MB onboard memory buffers for applications that demand transfer rates of over 20 MHz.

I hope this is clear and let me know if you have any further questions.

Regards,
Travis G.

0 Kudos
Message 4 of 10
(5,106 Views)
Travis,
 
I tried to send 16-bit buffered data of 1Mb Size at 2MHz clock rate on Port 0 & 1, receive the same on Ports 2 & 3. Now the VI does not give me any error but still i do not see any data received on the Ports 2 & 3. I have attached the modified code. Please see if i am doing something wrong or whether i need to change any more settings.
 
Regards,
Siddu
0 Kudos
Message 5 of 10
(5,094 Views)
Siddu,

I think you the problem you are seeing is a result of how you are packaging your data.  You still need to write and read to your dual-port groups by using arrays of 8-bit integers, but the arrays must be twice as long, with your port 0 data interleaved with your port 1 data.  Take a look at the Help file for 'DIO Write.vi' and 'DIO Read.vi' for a further explanation of how the data is interleaved.  Give the attached modified version of your program a try (hopefully I was able to save it so that it can be opened in LabVIEW 6.0.2).  Let me know if this helps.

Regards,
Travis G.
0 Kudos
Message 6 of 10
(5,066 Views)

Hi Travis,

The modified code works fine at clock rates less than 1.4Mhz for 1 Mb buffer size. But when i set the clock rate greater than 1.4 Mhz i do not receive all the data on the RX ports. Also mainly, i do not receive the order that i transmit. So iny my test i have to compare the data transmitted with the data received and that always fails beacuse i operate at 2 Mhz clock rate. Why does this happen? Do we need to change the wait state or add any other synchronisation to achieve this.

Regards,

Siddu

0 Kudos
Message 7 of 10
(5,062 Views)

Hi Siddu,

The rates for your application are going to be system dependant since the 6533 does not have much onboard memory so the driver has to continue to output samples from the buffer on the PC rather than memory on the card itself. However, I believe that you should still be able to achieve 2,000,000 Hz rates with this device since it is a HS device.

Have you tried running buffered digital input and output examples? There are some great examples in the LabVIEW example finder under Help >> Find Examples >> Hardware Input and Output >> Traditional DAQ >> Digital Input and Output.

Also, I strongly recommend that you upgrade to a newer version of LabVIEW. This way, you will be able to use the DAQmx driver which will make programming your application significantly simpler and easier to troubleshoot at the same time. Please try running the example programs and let me know what rates you can use and consider upgrading.

Regards,

Hal L.

0 Kudos
Message 8 of 10
(5,033 Views)

Hi Hal,

I think i have 6534 card which is supposed to have onbaord memory. Also this particular card is released well before the latest versions of DAQ or LabVIEW. So when the card is supposed to work at high speeds like 20 Mhz i do not see any reason for a simple buffered loopback operation fail at 2 Mhz.

Regards,

Siddu

0 Kudos
Message 9 of 10
(5,026 Views)

Hi Siddu,

The PCI-DIO-32HS is the equivalent to the PCI-6533, which does not have the 32 MB of onboard memory that the 6534 possesses. Still, the PCI-DIO-32HS will work at rates of 20 Mhz. However, to use this device at these rates, you will have to limit how much data you output. Due to the onboard memory limitations of the 6533, the driver has to continually write data from the PC, which will make your rates extremely system dependant. So, if you would like to output 2 MB of data, you will have to reduce your input and output rates.

Regards,
Hal L.
0 Kudos
Message 10 of 10
(5,009 Views)