From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Understanding labview fpga using sbRIO

Hi,

 

I'm a newbie to labview fpga and sbRIO. I am trying to acquire analog data by varying a potentiometer. I have done this using NI USB 6008, but how do you acquire using sbRIO? What code do I need to write in the fpga target and RT target? Is the actual code (code used while using NI 6008) written on the RT target?

Should I just add the analog input nodes on the fpga target?

Help!

0 Kudos
Message 1 of 19
(4,038 Views)

Hi kdm,

 

when you get access to a new device you should read its manual at first. After done so you need to make sure you installed all the needed dirvers for your hardware. Then you start by studying the examples coming with the hardware drivers for your device.

 

Did you do all those steps?

Did you understand all the examples provided by NI for your sbRIO?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 19
(4,024 Views)

I'll throw in two links:

 

http://www.ni.com/singleboard/setup/

This should be the starting point for anybody new to an sbRIO.

 

http://www.ni.com/white-paper/11199/en/

Even more specifically, this paper covers both Scan Interface (*spits*) and FPGA programming, and is well worth a read if you're truly a fish out of water.

---
CLA
Message 3 of 19
(4,010 Views)

Hi GerdW,

 

I am using sbRIO 9641. Yes, I read the manual and I have installed all the needed drivers.

Can you please send me the links to example codes for sbRIO?

I found this http://www.ni.com/example/31180/en/ , but before going through this, I would like to study a simpler example.

0 Kudos
Message 4 of 19
(4,006 Views)

Hi kdm,

 

when you installed LV-RT you just need to open the example finder in LabVIEW. Search for example suited for sbRIO…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 19
(3,998 Views)

 

Why does this vi indicate values when I've nothing connected to AI0 (It is supposed display 0)? 

I have attached the code.

0 Kudos
Message 6 of 19
(3,980 Views)

Hi kdm,

 

can't answer without knowing anything on the FPGA code used for that VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 19
(3,976 Views)

Especially when dealing with RIO, you need to include your entire project.  Zip up all of your code (project file, VIs, controls, etc.) and post the zip file.  Single VIs are next to meaningless in this situation since we are dealing with entire systems now.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 19
(3,964 Views)

 

Here is the project.

0 Kudos
Message 9 of 19
(3,936 Views)

Hi Gerd,

 

When I run it, the AI0 value keeps increasing. Don't know why. Isn't it supposed to read zero? 

And when I connect a potentiometer (+ve to AI0 and gnd to AGND), it reads 0 and does not vary as I turn it. 

Can anyone give a clear explanation?

0 Kudos
Message 10 of 19
(3,905 Views)