Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed up PCI-6229 LV code

Hi,

I am using a PCI 6229 card to sent data to an external controller (a customized ASIC). The communication is setup through a number of lines on port0.
Data is sent (and read) over the databus on lines 0 to 7.
On line 15 the external controller sents back an ACKnowledge signal, to confirm receipt of data or completion of a command
On lines 16, 19 and 22 I have put the control signals that I need to communicate with the external controller:
Line16 = Command  (high), Data (low); to select if I am sending a command or data
Line19 = Device Select signal; to indicate to the external controller that a new command or data byte is ready for it on lines0-7
Line22 = Read (high), Write (low); to indicate to the data port that the 6229 card is going to read a byte on lines0-7 or write a byte to the external controller

The LV (version 8.5) code I have written is working based on DAQmx, but ... it is too slow. One application is to sent an image (1024 x 1024 in 8bit greyscales) to the external controller, but this takes almost 10 minutes.

Are there ways to speed up this? I have tried to adapt the m_series_triggered_dio.vi and m_series_correlated_dio.vi examples, but I don't see how I can get the right trigger, clock or change detection settings.

Or is it only possible to convert the code into a DLL and call this from LV? If so, how much time can I gain?

kind regards,

Tom
0 Kudos
Message 1 of 6
(2,998 Views)
Unfortunatelly no response yet...

Meanwhile, I have looked more into the specs/manual of the Mseries DAQ. On page 6-9 of the manual it says: "You also can use the Change Detection Event signal to trigger DO or
counter generations."

So, I think that it should be possible to generate digital output (DO) waveforms and make them "hardware-timed" by using a "changedetectionevent" on one of the Digital Inputs (line15 of port0 in my case).
I have implemented this in a vi, but the DO waveform is just not being started (although the "Number of samples written per channel" on the DAQmx write vi, claims  they were outputted)

What I am doing wrong?
Do I need to configure a output buffer?
How fast does the changedetectionevent sample the DI port? Must I match the sample clock for the DO with the changedetection events?
Or should I first use changedetectionevents to trigger a counter/timer that generates the sample clock for the DO?

I kinda lost here...

Tom
0 Kudos
Message 2 of 6
(2,959 Views)

Dear Sir,

Thank you for your post on our website.

What you are trying to do is handshaking. The M series DAQ boards are not a ideal solution for this kind of digital in / output. A better solution is a digital in and output card (for example PCI6536; http://sine.ni.com/nips/cds/view/p/lang/en/nid/202772 )

Based on this solution you can find a example in the example finder from Labview (search on handshaking). Please find also some examples on our web; http://zone.ni.com/devzone/cda/epd/p/id/3796

f you add your VI is can review it to look if speeding up is possible.

 

Best regards,

 

Martijn S

NI NL

 

 

 

 

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 3 of 6
(2,946 Views)
Martijn,

thanks for your suggestion, but I am obligated to use the 6229 card. Also, according to the M-series product manual (page 6-9) the 6229 card should be able to generate a clock for DO based on changedetectionevents. The 653x series are somewhat "overkill" with respect to my application, that also includes a large number of Analogue voltage measurements. So before I am going to try a different card, I first want to see what performance I get from the 6229. The spec says 1 MHz, which is enough for me. the 653x series are 25 Mhz and up.

I have included the trial vi as I have it so far.
0 Kudos
Message 4 of 6
(2,936 Views)

Dear Tom,

I'm still working to figure out what is the best way to implement this. There is a difference between the ports; lines 15,16,19 and 22 are static (software timed), the performance depends on your system. At this moment I wanted to share a example (change detection). I hope this will be helpfull, but besides that I will come back to you as soon as possible.

 

Best regards,

 

Martijn S

National Instrumetns NL

 

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 5 of 6
(2,902 Views)

Dear Tom,

 

Ass promised some additional information on my last post.

To achieve the 1 MHz DIO speed (only on port 0) you need to correlate your digital output lines, a example for this can be found under this link; ttp://sine.ni.com/devzone/cda/epd/p/id/1566

Please not that after every send there will be a software call for a handshakes. The handling time of this call depends entirely on your system performance. With cards which do support handshaking the handshaking will be done onboard; so no software calls are needed.

By using the RTSI bus you will be able to synchronize a digital i/o card with your PCI 6229. Another solution is to use a R series (FPGA) card. With FPGA you will be able to program the handshaking on the DAQ card itself; so also no software calls. These cards are also available with analog in and output besides the DIO. PLease note that you will need Labview FPGA to program this kind of hardware. Please find the FPGA solution with this link; http://sine.ni.com/nips/cds/view/p/lang/en/nid/202005

If you haven any questions, please don't hesitate to contact me.

Best regards,

 

Martijn S

National Instruments Netherlands.

0348-433466

 

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 6 of 6
(2,895 Views)