LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compact rio

Solved!
Go to solution

Hi. I am a new Labview user and I have a question about interfacing with FPGA. I have a compactrio and a 2 ni 9237 which a couple of pressure sensors connected to it. At the begining I just wanted to make sure that my sensors are working well so I tried to take their readings and comparing it with the calibration data. The problem is  the reading I am taking does not change at alll according to the attached graph. I also attached a couple of pictures of my program. I would be grateful if somebody tell me what I am doing wrong according to the attachments.

 

Thanks.

0 Kudos
Message 1 of 10
(3,182 Views)
Solution
Accepted by topic author MajTal

The way you have written the code will not give you what you are looking for.

 

  • You are running the FPGA code without a time delay which means the FPGA with 40MHz clock frequency executes the code much faster than your pressure sensor starts to react.
  • You are running the code just to acquire 20K samples which may not be useful
  • Try to run the code continously with a delay of 100 micro seconds (10KHz) and just use the FPGA Code Controls and Indicators to read the data in the RT/HOST.
-----

The best solution is the one you find it by yourself
Message 2 of 10
(3,160 Views)

If all that is required is to test that the sensors are working and that the cRIO is connected correctly then do you need to be using the FPGA at all?

 

Why not just use the RT environment on the cRIO and avoid having to wait to compile the FPGA every time?

0 Kudos
Message 3 of 10
(3,140 Views)

Thanks for the reply. Can you show me on the attached files what modification you mean? 

Download All
0 Kudos
Message 4 of 10
(3,118 Views)

I want to make sure I am taking the exact value corresponding to the sensor output. Someone told me the only way to take the exact value is using FPGA interface. Otherwise the output is not meaningful.  Is that right?

0 Kudos
Message 5 of 10
(3,117 Views)

@MajTal wrote:

I want to make sure I am taking the exact value corresponding to the sensor output. Someone told me the only way to take the exact value is using FPGA interface. Otherwise the output is not meaningful.  Is that right?


Thats a myth. For pressure sensors a simple DAQ card is good enough to make measurements. FPGA cards are suggested in Stand alone control application and then in cases where a high sampling rate is required which cannot be satisfied by using a PCI/PXI DAQ cards.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 10
(3,091 Views)

P@Anand: Did you see the VI file I attached earlier? Can you please modify them according to what you said in your earlier comments? 

0 Kudos
Message 7 of 10
(3,066 Views)

Sorry, I would not encourage that. Its your learning chance so please try your best and come back if you face any issue, or not bale to understand the concept.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 10
(3,058 Views)

For understanding CompactRIO, there is a Developer Guide to help:

http://www.ni.com/compactriodevguide/

 

If you havent got any Real-Time or FPGA course training, then this is a must to start with.

0 Kudos
Message 9 of 10
(3,045 Views)

Thanks for motivating me but I could not do anything more of that! I would be much beyond grateful if you just help me this time and correct my VI codes. I am really in rush dear friend.

0 Kudos
Message 10 of 10
(3,005 Views)