From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combine LabView FPGA with external DAC/ADC

Hello everyone,

I am trying to implement a FPGA based PID controller in our Lab and we aim at a regulation bandwidth on the order of hundreds oh kHz. In order to get there it seems that one of the biggest obstacles is the DA/AD conversion. Our testkit (sbRio 9631) specifies for the analog channels update times of approx. 4 micro s in both directions (at 40MHz standard clock speed). Since I need at least both conversions once I am already looking at a minimum cycle time  of 8 mu s. Now, we were wondering if we could speed this up quite well if we use external converters that have a much higher bandwidth. Their output would be passed on to the digital inputs which are only limited by the clock speed (is that right?) and could thus have an 'update time' 1/clockspeed?

 

I am aware of the fact that increasing the clock speed would help as well but from my naive point of view the most effective solution would to use external DAC/ADC. Besides using external ICs for that there are probably NI products available to help here, can anyone recommend something?

 

I am quite new to both LabView and FPGAs and also came up with a few more questions that probably anyone slightly more experienced could quickly resolve:

- Why do many LabView FPGA examples include a host and an FPGA VI? Wouldnt it be preferable to do as much as possible on the FPGA so that as little communication between the MPU and the FPGa chip is necessary?

 

- How much does outputting data (for instance via an indicator) on the front panel affect the running speed?

 

Thanks in advance!

 

Jakob

0 Kudos
Message 1 of 3
(2,837 Views)

I can't help you with the ADC question, although I am very curious what sort of process you're trying to control with PID that requires the kind of speed you want. What sort of actuator are you driving that can respond that fast?

 

As to your other questions:

The host code provides external access to the FPGA, through a user interface or over the network. The host code can read or write to disk, access much greater amounts of memory than the FPGA, and do other general-purpose processing. The FPGA handles only the highest-speed tasks and the host processor does everything else. For a control application such as yours it might be fine to keep nearly all the logic on the FPGA, but many FPGA applications deal with large quantities of data where the FPGA can handle only a small chunk at a time and the host transfers chunks back and forth.

 

Displaying values on the front panel has no effect on FPGA execution speed. The FPGA is hardware and the only operations it performs are the ones you program, so there's nothing else happening in the background.

0 Kudos
Message 2 of 3
(2,825 Views)

Hi,

 

With regards to your first question. If you are also interested in Analog Ouput, unfortunately, the DA conversion will take 10 uS, since it samples at 100kS/s. What would mean that your task will take even longer than you have anticipated at the moment (I looked that up from the 9631 specs here : http://sine.ni.com/nips/cds/view/p/lang/en/nid/205894).

 

You could in theory use external DAC/ADC and then use simple digital IO to process them on the FPGA in parallel (You were correct here, they do take only 1 cycle to be processed), however this would obviously be not be as "plug and play" as with the integrated converters, since you would need to use SPI or some kind of other serial protocol to handle all those digital lines.

 

Usually for very High-Speed applications customers tend to use the PXI system, some of its modules can do sampling in mega samples per second. But even when having such a high throughput, you can experience certain latency.

______________________________________________________

Mark N
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 3 of 3
(2,800 Views)