LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of communication with compactrio

Hello,

I am working with a compactrio 9014 and labview 8.5

I have a problem of communication with my compactrio. I acquire sound with NI 9215 and transmit points from the fpga VI to the VI on the real time target at a rate of 10Khz. On the VI on the RT I have two loops, one determinisic running at a speed of 10Khz (0.1ms) (in this loop I will do my signal processing) and one non-deterministic running much slower (20ms) to communicate data to my computer. To communicate data to my PC, I used shared variable.

The problem is that if I run the VI_RT, I loose immidiately the connection. I think that is because the VI is taking up all of the execution time of the processor and is starving out the communication loop that is used to send data back to my PC.

Because of this problem, I try to configure my compactrio to automatically run on startup of my cRIO. So I follow the steps I have read in another message in the forum posted by MattP
"
To make your application (RT host VI and FPGA VI) run automatically on startup of your cRIO, you will need to do the following:
1.  Download the FPGA VI to the flash memory on your cRIO.  If using LabVIEW 8, right-click on the VI in the Project Explorer Window and select Download VI or Attributes to Flash Memory...
2.  Build an executable out of the RT VI.  Under your RT target  in the Project Explorer, right-click on Build Specifications and select New>>Real-Time Application.  Select the source files necessary for your application and any support files to be included.  Click Build.
3.. After building the RT Application, you will find its entry under the Build Specifications folder in your project.  Right-click on the application and choose Set as startup.  Right-click again and choose Deploy, which will download the application to your cRIO.
"
With  this procedure, I thougt that I can  run my  loop faster  because I  don't have the RT VI open on my desktop  (PC), so the PC don't have to synchronise the VI. But when I startup my compactrio, I loose connection with the target...

So, what is wrong with my project?  Is it possible to run a loop at 10kHz on the real time processor and communicate in the same time (but every 20ms) data to my PC. Can someone explain me the right procedure to do that at this frequencies?

I have attached my project and hope that someone can help me.


0 Kudos
Message 1 of 4
(2,886 Views)

Hello,

The method you use in your application to transfer the data from the FPGA to the RT Host use the Front Panel Interactive Communication that write/read the control/indicators of the FPGA VI. This method provides also risk of Race Condition and use uP resources.

To avoid errors in data caused by race conditions and use less processor resources,  I suggest you to rewrite this part of your application with the method  DMA transfer from FPGA to Host.

Best Regards,
Nick_CH

 
0 Kudos
Message 2 of 4
(2,856 Views)

Hello,

I saw that you posted lots of question about the cRIO and about the architecture of your application.

Since last year, National Instruments provides a 3-Days course called CompactRIO and LabVIEW Development Fundamentals.

This course contents the following topics:
-> Configuration
-> Architecture
-> FPGA Programming and Optimization
-> Data Transfer and Synchronization
-> ...

Best regards,
Nick_CH

 
0 Kudos
Message 3 of 4
(2,851 Views)
Hi Valis,
 
Are you able to ping, FTP, or discover your controller in MAX?  What does the console out information provide?  What version of NI RIO are you using with 8.5 and the 9014 controller?
 
Regards,
 
Steve
0 Kudos
Message 4 of 4
(2,831 Views)