LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

*Complete Newbie* Using raspberry pi to forward readings live to a server

Solved!
Go to solution

Hello

 

I am completely new to LabVIEW, and have some limited programming knowledge in python and C. 

 

I am looking for a little help. I have a program written by someone else gathering strain gauge data through NI 9219 modules which is then connected to a laptop over Ethernet (from a 9188) and assembled into a CSV file. In order to generate the CSV, the program must be stopped, the file written, and the program restarted. It also requires a dedicated laptop to do this. 

 

I have a requirement for the data to be sent live to a server, and would like to free up the laptop too as using it has it's own set of problems. I want to use a raspberry pi to take the data from the loggers and send it on live over WiFi to our server rather than the current system. 

 

The trouble is I am a bit out of my depth here... Is what I am trying to do even possible? And, if so, do I have it right that the correct way would be to connect to the 9188 (how?) with the Raspberry, assemble the values into a string (using python?), and forward them directly to our server? 

 

Apologies for the complete "novice" questions and lack of understanding. But any help or advice that could be given would be very much appreciated! 

 

Download All
0 Kudos
Message 1 of 8
(3,531 Views)

There is some basic LabVIEW for the Raspberry Pi (Linx), but there is no way to use NI hardware like the 9219 directly with the Raspberry Pi.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(3,517 Views)

Really? I am surprised. Are these modules compatible only with LabVIEW installed on a laptop? I am guessing that the syntax etc for the NI kit is not open? 

0 Kudos
Message 3 of 8
(3,514 Views)

@Fall-Apart-Dave wrote:

Really? I am surprised. Are these modules compatible only with LabVIEW installed on a laptop? I am guessing that the syntax etc for the NI kit is not open? 


It is more of a matter of drivers for the DAQ hardware and the fact that the Raspberry Pi is just a "toy". not an industrial device.

 

Poke around at the LabVIEW Makerhub maybe you can find more info or guidance.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 8
(3,510 Views)

Perhaps. However, there are very good reasons for using the Raspberry, the WiFi is enterprise 2 stage encryption and there's nothing readily available that can log onto it in terms of loggers etc. I would have thought that, despite being a "toy", the vesatility of the Raspberry would make it an ideal candidate for forwarding on data pulled from the strain gauges? 

I am poking around on that forum now. Thank you for the link! 

0 Kudos
Message 5 of 8
(3,504 Views)
Solution
Accepted by topic author Fall-Apart-Dave

The part I think you are missing is the hardware integration is where the money is at. That hardware integration relies on a big library of drivers like NI-DAQ and VISA. These drivers that operate on the hardware level are of course OS specific.

 

BTW: There is a LabVIEW available for Linux but I believe it's only for x86 based computers so it will not run on the R-Pi.

 

Once you start building executables and distributing installers you will see what I mean.

 

An average LabVIEW compiled program is around 100Kb but you have to install several gigabytes of drivers and support libraries on the target machine before that 100Kb program will run.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 8
(3,495 Views)

Gotchya. Now I understand. I had (incorrectly) assumed that it was a case of the hardware having the required configurations and drivers on board, and that it was simply churning out a stream of data to the laptop which was then assembling into a CSV. I'd not realised that the drivers and functions were required on the computer too. Much of what I deal with at the moment is outputting either raw analogue outputs or a digital string. It's a shame I cannot simply forward this on to a server. Unless of course I can use the RPi as a bridge, and have the labview running remotely? 

 

Back to the drawing board. 

0 Kudos
Message 7 of 8
(3,486 Views)

Look into talking to instruments through pyvisa-py with a raspberry pi.  I talk to Extech RH520 using "ASRL3" specifically as a visa resource.  The data is then sent to a .html website hosted on the private network via mediamongrels websocket.  (this is all done with a raspberry pi that has a .vi running as startup mode through LINX)

----------------------------------------------------
Studying for CLA.
LabVIEW, inherit from social media habits!
0 Kudos
Message 8 of 8
(2,729 Views)