06-28-2010 07:35 PM
Hi,
I'm writing a control program and would like in pass values from sensors to a routine I have written in the R statistical language, then act on the response. Does anyone have experience exchanging data and commands between Labview and R?
thanks,
moose
06-29-2010 05:43 AM - edited 06-29-2010 05:43 AM
Hello moose,
I haven't used the R statistical language, but I have heard that it has a COM interface. Through COM you can interface it in variety of languages and of course LabVIEW is not an exception.
I got an link for using R COM in .NET, it's not that much efficient but you can get some basic idea about interfacing R COM.
http://www.codeproject.com/KB/cs/RtoCSharp.aspx
AshwiN
05-26-2011 04:13 PM
Hello,
I am working on writing a data processing package in LabView. I would like to import R code into Labview to run principal component analysis. Does anyone know of a way to do this?
Thanks - Mike
05-26-2011 04:27 PM
I don't know about importing R code into labview, but I came across a couple of very useful webpages that got me going.
http://joachimvandenbogaert.wordpress.com/2009/03/26/r-and-c-on-windows/
http://absolute-antinomian.blogspot.com/search?q=lABVIEW+R
The first explains the nuts and bolts of installing the Rcom packages that you will need to use the vi's available on the second page... there you will find a couple of nice vi's that page it quite possible to pass variables and commands to R and get data back.
It takes some fun with strings to get your results back into numbers, but it saved me a lot of time to be able to use R functionality to perform some specialized calculations.
Hope this helps.
moose
01-15-2014 04:30 AM
Mike,
I'm also interested in doing this. Did you manage to make it work? if so, how?
Thanks,
Jolyon
01-15-2014 08:09 AM
The last time "Mike" was on the forums was almost 4 years ago. He might not see your post. But you could use his advice.
Cameron