LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO communication

Hi,

 

Im trying to find some information on how the real time, FPGA module and host PC communicate between each other. For example do any use DMA? Ive looked through the guides on ni.com but cannot seem to find any information of use, most just give a brief description of the part and instructions for use.

 

Any help would be much appriciated,

 

Thanks,
Mark

0 Kudos
Message 1 of 7
(4,245 Views)
The FPGA and the real time target will use DMA between them. The real time can communicate with the host via shared variables or TCP/IP. You should have a proper look at examples provided in the Example Finder (Help -> Find Examples..). IF you have any questions after that, post back.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 7
(4,237 Views)

Ok, thanks for that.

 

How does the host PC communicate with the FPGA modules? I thought that they you could use the FPGA modules without the real time, is this correct?

 

Thanks,

Mark

0 Kudos
Message 3 of 7
(4,234 Views)

Hi Mark,

 

Be careful of how you word it. There are no FPGA modules; these are called C-Series modules and there is a FPGA target (chip) in the cRIO chassis which communicates with them. Traditionally, these CompactRIO I/O modules have been accessed by programming the FPGA and then, in LabVIEW Real-Time, using the LabVIEW FPGA Interface VIs. But now, there is the CompactRIO Scan Mode which automatically detects your I/O modules and adds them to the LabVIEW Project. You can then drag and drop the I/O variables onto your LabVIEW Real-Time and host VI block diagrams and instantly read and write scaled, calibrated I/O data without any FPGA programming or compiling. You will still need to use LabVIEW Real Time in order to do this.

 

Unless, you are talking about the R Series FPGA targets which don't need LabVIEW Real Time to program, they only need LabVIEW FPGA.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 7
(4,227 Views)

Ok, so when the CompactRIO I/O modules have been accessed by programming the FPGA and using the LabVIEW FPGA Interface VIs, is the real time just used to communicate with the FPGA and hence I/O modules? i.e. no vi's are run on the real time.

 

Also, how does the FPGA communicate with the modules?

 

Thanks,

Mark

0 Kudos
Message 5 of 7
(4,218 Views)

If you are using cRIO, and are doing FPGA programming, then you will be running VIs on the real time platform of the cRIO to communicate with the C-Series Modules.

 

The FPGA communciates with the ADC of each module to get the raw data values (in binary) and you can send these values to the Real Time VIs using the Read/Write Control or doing a DMA transfer.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 7
(4,194 Views)

Hi Mark,


Good afternoon and I hope your well today.

 

I wanted to check if you still had any more questions regarding your question? I can see Adnan (previous AE at UK Support) has been giving you great support thus far. 

 

I would like to add, that if your using LabVIEW 8.6 (or greater) and supported controller/backplane you could consider using Scan Engine which removes the need to program the FPGA. This allows you to directly access the I/O from the C Series modules from the Real Time code. You would then use TCP/IP (or shared variables - based on TCP/IP) to communicate with the windows machine. 

 

Some links which may be of interested to you:

 

FPGA Design, Development and Programming Tutorial

https://www.ni.com/en/shop/electronic-test-instrumentation/add-ons-for-electronic-test-and-instrumen...

 

Using NI CompactRIO Scan Mode with NI LabVIEW Software

https://www.ni.com/en/support/documentation/supplemental/08/understanding-ni-compactrio-scan-mode.ht...

 

Reference Example for Streaming Data from FPGA to cRIO to Windows

http://zone.ni.com/devzone/cda/epd/p/id/5919 

*Example code.

**As Adnan said look at the examples in Example Finder (Hardware Input/Output>>cRIO). 

 

Please let us know if you have any more questions, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 7 of 7
(4,180 Views)