LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview NI myRIO export and import data from Google Drive

Hello everyone,

 

I am using a complex program created in LabVIEW for NI myRIO-1900 but I am having some problems on figuring out how to export the data I gathered from it, I'll give you more detailed information below.

 

1. I have myRIO writing data from sensors on a .txt file formatted to be promptly opened in Excel / Google Sheets, distributing all data up to a limited number of columns and several rows per day (depending on the aquisition rate selected by the user), the file is located in a USB pen connected to myRIO.

2. From what I have seen, the 2 main solutions to export data are sending it to a webpage (although I have not figured out how to show it outside my private network, but this doesn't seem like the best solution) and sending it to the local PC in my network through TCP/IP.

 

What I truly want is to be able to export the data (in file format) to lets say google sheets (google drive) without using a local computer (send them directly from myRIO to google drive for example) or sending them to a remote PC outside myRIO's network, it was best if the PC wasnt running LabVIEW.

 

The data would then be worked to make a dashboard to show it, in which you would be able to see daily readings per sensor, means, alarms and so on if you had access to said account. I'd also like to be able to write a certain file from the remote host side (google drive) and send it to myRIO to do some configurations.

 

I have looked at connecting myRIO to a Raspberry Pi in which the Raspberry would act as the local host PC running the VIs to receive the txt file(s) from the target and upload them to google drive and receive files from the drive and send them to myRIO, but seems like most solutions for this have been discontinued last year or do not have that much information available.

 

Thanks in advance for any possible solutions or workarounds,

 

Saul

0 Kudos
Message 1 of 3
(1,522 Views)

The myRIO-1900 is designed as a LabVIEW Real-Time platform, running NI Linux Real-Time.  As such, it is not meant to be a "Host" processor, running Windows (or "regular" Linux) and able to reach out to other platforms across the Network.

 

I recommend you use this device as it was meant to be used, namely as a Real-Time peripheral attached (via a USB Cable acting as a TCP/IP "conduit", or via WiFi) to a Host PC running Windows and LabVIEW.  The Host will be able to support a full LabVIEW Front Panel (something that the myRIO cannot do), will be able to exchange data with the myRIO using LabVIEW Network Streams, and be able to communicate with the Web, including Google Drive.  

 

Bob Schor

0 Kudos
Message 2 of 3
(1,486 Views)

@volkun wrote:

 

I have looked at connecting myRIO to a Raspberry Pi in which the Raspberry would act as the local host PC running the VIs to receive the txt file(s) from the target and upload them to google drive and receive files from the drive and send them to myRIO, but seems like most solutions for this have been discontinued last year or do not have that much information available.


This sounds like a pretty roundabout way of doing things. The Raspberry Pi is in most things nothing more or less than the myRIO. The only difference really is that the myRIO runs a dedicated NI Linux RT kernel while on the Raspberry Pi the LabVIEW runtime executes in a Linux Debian kernel that runs inside a chroot environment on top of the Raspbian OS (which in essence is a Debian based Linux environment too)..

 

Now it is not quite clear what you are really trying to do here. The most easy thing would likely be if you can find a Windows (or SMB compatible) server on your network and simply mount a share from it on the myRIO with SAMBA. That certainly can be done on the myRIO as there is a SAMBA package to install for it. Other things are usually much trickier to do. The NI Linux RT system on the myRIO is a special distribution that you can't just take any existing package from another Linux system and install it on. For one it runs an ARM CPU so all the typical pre compiled Linux package for desktop Linux simply can't run on it as they are compiled for x86/x64 CPUs. But even if the CPU would be compatible, the NI Linux RT system is in several ways different enough that you can't just install standard packages in a similar way as you can't often install Debian packages on Redhat systems and vice versa.

 

NI has some binary packages compiled for the NI Linux platform and provides them on the their opkg feeds but they can't provide packages for every software out there. So while there for sure is somewhere a Linux software that would provide Google Drive access to a server in the cloud (not creating a server on your local device), it may be necessary to compile that from sources on your myRIO. And that is not always trivial and of course requires also that you can enter a few command line entries on the console. Some gcc command line knowledge helps too.

 

And once you have that you will need to make a LabVIEW interface that calls the according shared library through Call Library Nodes.

 

An alternative might be if Google Drive supports a REST API. That might be possible to be implemented directly on top of the LabVIEW HTTP Client VIs.

 

Either solution is not trivial and simple and requires a substantial effort in learning new tools and studying the according API techniques. And with substantial I'm talking about more than a few days, for someone who already knows the basics that are required for this.

 

So try to consider using SAMBA, it will require some fiddling too to get the SAMBA configuration files setup correctly but it will be magnitudes simpler than trying to access a Google Drive API.

 

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(1,460 Views)