LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program a SoM sbRIO-9651

Solved!
Go to solution
Solution
Accepted by topic author David-Baratheon

Try right-clicking on the FPGA target and go to 'New -> I/O'.

 

If that doesn't work, you might need to add the reference board as an addon card/module first - try right clicking the socket / chassis and see if there is an option there to add it.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 11 of 28
(2,315 Views)
Solution
Accepted by topic author David-Baratheon

For the SOM you need to right click the Socket and select Properties.  It should bring up the window below after a bit.  Once it is up, select DevKit from the drop down (DevKit2 if you are using LabVIEW 2015).

 

Socket Select.png

 

After doing this you should see all I/O in under the Socket once it is expanded.

Matt J | National Instruments | CLA
Message 12 of 28
(2,310 Views)

I utilised DevKit2 as Im using LabVIEW 2015 and it appears to have worked, so thanks for that.

 

I am trying to create a basic switch to LED program as my first embedded system program. For some reason the LED is showing as an output rather than an input though. I have tried both LED1 IN and LED1 OUT and both are outputs. Any suggestions?

 

Embedded Programming.png

0 Kudos
Message 13 of 28
(2,281 Views)
Solution
Accepted by topic author David-Baratheon

Can you right click on the node and 'change to write' ? The FPGA I/O nodes are similar to property nodes - you can read from an output to check its value. If it's a write (output) node, the terminal will be on the left-hand side.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 14 of 28
(2,277 Views)

Change to write is greyed out for me

 

menu option.png

0 Kudos
Message 15 of 28
(2,262 Views)

I've just noticed that I also have LED Enable on my digital I/Os as well as LED In and LED Out.

 

LED Enable is also an output though. So not sure how I can use the LED is an input so I can feed in a signal to switch it on or off

0 Kudos
Message 16 of 28
(2,256 Views)
Solution
Accepted by topic author David-Baratheon

The fact that the text on the I/O nodes is black indicates to me that something isn't quite right here - normally the colour of the text matches the data type. For example, for a boolean the text should be green, here's a screenshot from some of my FPGA code showing a digital output and an analogue input:

 

2015-09-24_11-53-12.png

 

The obvious thing I can think of - is your FPGA VI actually under the FPGA target? The location of the VI in the project tree determines which device it's supposed to run on, it might be that you have it running on the RT target instead of the FPGA. Drag the VI under the FPGA Target in the project and that should fix it (you can see the current target at the bottom left of the VI - it should say My Computer, SoM (whatever the SoM is called on your project, or FPGA Target).

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 17 of 28
(2,241 Views)

Ah brilliant, that seems to have resolved that problem. It was previously in the NI-sbRIO-9651 part of the hierarchy. Moving it to ->CHassis -> FPGA target seems to have done the trick. I now have inputs and outputs.

 

I am still a bit confused as to why each block has an input and an output, and each LED has IN, OUT, and ENABLE.

 

The following tutorial I am following looked a lot simpler:

 

https://learn.ni.com/learn/article/getting-started-with-fpga

 

 

Hierarchy.png

0 Kudos
Message 18 of 28
(2,234 Views)

I have managed to successfully deploy a program finally, but the program isn't working correctly. Had to mess around with the IP address, firmware, FPGA Compile Cloud and other stuff before I could actually send any code to the device.

 

I've probed the switch and I'm not sending any signal so clearly I am not utilising my switches and LEDs correctly. Any ideas? 

 

Button not working.png

0 Kudos
Message 19 of 28
(2,219 Views)
Solution
Accepted by topic author David-Baratheon

You are wiring the wrong terminals. Look at the data type of the wire! It is a reference to an I/O item not a boolean value! Also, the code is running on the FPGA at very high-speed so I'm not sure that probes work unless you run it in simulation mode.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 20 of 28
(2,212 Views)