12-03-2013 05:12 AM
I am currently working on a project where we are building a UAV submarine using the myRIO as the controller. Initially the submarine is planned to be tethered as so to give it commands (not completely autonomous yet) and for it to send image data back to the surface. The tether was decided due to the added safety that if the submarine fails we can still retrieve it by pulling it up.
My initial thought was to interface over Ethernet as this allows for a long length of cable to be used without a dropout in communication. The myRIO doesn't have an Ethernet port so my first question would be does anyone know of a way that I could add this functionality easily.
If not does anyone know of a different method. I am looking for a reliable connection using about 20-30m of cable. Whatever type of cable that may be.
12-03-2013 11:57 AM
If you want to send image data back ethernet is probably your best bet. myRIO does not have an ethernet port but does have a USB port and you should be able to use a USB/Ethernet adapter, the trick will be getting the drivers setup so myRIO recognized the NIC. I'll see if I can find a USB/Ethernet adapter to test this and give a recommendation.
-Sam K
LabVIEW Hacker
Join / Follow the LabVIEW Hacker Group on google+
12-03-2013 02:22 PM
I looked into it a bit and most USB / ethernet drivers will probably use the ASIX chipset which should work 'out of the box' on myRIO.
For example, this one should work.
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
12-03-2013 04:20 PM
Thanks just so I know what to look for when buying one is there a KB anywhere that shows what is supported? I assumed that as it is an RT target it wouldnt work with something like that as plug and play tends to only apply to windows targets. I was starting to look at SPI/I2C interface ports and that seemed like a lot code would be required to get that up and running.
Also would I then just be using the VISA drivers as normal to interface with the ethernet port to send my data? or would it require its own instrument driver/library?
12-04-2013 09:06 AM
Hey,
myRIO uses the NI Linux Real-Time OS which is why more devices like USB/Ethernet adapters will work out of the box. There is not currently a KB with supported devices, however as I mentioned anything with the ASIX chipset should work out of the box. You may have to find the spec sheet for the device since most product pages on amazon or newegg for example typically don't list the chipset (although some do).
If you're talking about using SPI or I2C for adding an Ethernet adapter then yes, that is much much more complicated than the USB / Ethernet converter.
Once the adapter is recognized by myRIO it will act like any other NIC. It will get (or you can assign) an IP address to it and use the TCP /UDP primitives in LabVIEW to send data to other devices connected to that network.
Let us know if you have more questions.
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
12-09-2013 09:00 AM
Thanks yeah the TCP/UDP primitives would be ideal and was what I was hoping to use.
Would there be any way to verify whether the adaptor was connected to the myRIO or not?. I know that it doesnt use MAX as other NI Products do so is there an equivelent method to configure the adaptor is the primitives the only method and verify programatically.
I have now got a Lenovo U2L 100P-Y1 ethernet adaptor that I can verify this but struggling to see where to set it up. I was expecting to see something here
Thanks for all your help so far
12-09-2013 09:30 AM
Hey Trottmpq,
You can use MAX with myRIO just like any other NI RT target. I'd check MAX to see if you see the attitudinal NIC, but I'm not sure if it will show up there or not (I'll try to find out, let us know if you get to it before I do).
If all else fails you can configure the USB / Ethernet NIC by SSHing into the myRIO and using Linux terminal commands to configure and test the NIC. Once the NIC is configure with the correct settings you can simply use the TCP prims in LabVIEW to talk to a remote device. The OS will figure out which NIC to send the data out based on the destination IP address (ie once it is setup you don't have to do anything special to 'trick' it into using the right NIC).
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
12-09-2013 11:28 AM - edited 12-09-2013 11:29 AM
Ok just to update you on where I have got to. I have had a look in MAX found the myRIO (diddnt think to look in remote devices) and no new NIC same as the web interface.
Installed all VISA software to the RIO in the hope that the USB and ENET passports were what i needed.
Now i see and unknown USB device listed on the RIO but am unable to configure it in any way
I SSHed into the RIO and had a look how the device was showing up in the /dev/ folder and only appears as 1-1
This seems to me that a driver is need at some level. I have had a bit of a search for how to go about doing this and come accross this tutorial.
http://plugable.com/2010/10/18/howto-asix-88178-usb-ethernet-adapter-on-ubuntu-10-10-linux
This requires me to connect the myRIO to the web to download compile and install the ASIX drivers. I know that these have been included into the Linux kernel recently so not sure how relevant this is and also my linux knowledge runs out here so connecting the RIO to the web is a bit beyond me through terminal.
Thanks for all your help so far. It feels like im close.
12-09-2013 12:20 PM
Can you post the output of ifconfig (the Linux terminal command).
The myRIO should already have the required driver for the ASIX chipset, so you shouldn't need to install anything else to the myRIO.
Thanks!
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
12-09-2013 04:12 PM
Its just the default network adaptors that are being shown