04-24-2019 11:58 AM
Hi,
I had some Arduino source code for measuring greenhouse environmental parameters such as temperature-humidity, CO2, solar radiation, etc. I heard these source code could be added using data communication options in Labview. I am searching for the proper way. I found an example of this topic (link attached) but that is in the Korean language and not properly described. Would anyone give me some suggestions and some examples link about this topic, please?
Thanks in advance.
http://cybermakerspace.com/portfolio-items/use-arduino-uno_due-using-the-labview/?portfolioCats=158
04-24-2019 01:28 PM
04-24-2019 03:47 PM - edited 04-24-2019 03:56 PM
Gerd is right, think of the Arduino as any other instrument with an RS-232 serial interface.
In fact this should be easier because YOU have full control of the data format, query commands and responses coming from the Arduino.
Here's some hints:
Also the example you linked to was an Arduino Yun (I think) because it has an Ethernet interface. If you are using an Arduino Uno your board only has a serial interface. So nothing LabVIEW wise in that example really applies to your board.
04-25-2019 12:47 AM
Respected Gerd and RTSLVU,
Thanks for your reply. Sorry, I couldn't express my query properly. In the formula node, we usually write some equations or code. I want to paste the Arduino source code in the LabVIEW. Is there any option like formula node in LabVIEW for this purpose. I have idea about serial communication of Arduino or LabVIEW-Arduino interface. But I don't want to use those ways.
04-25-2019 01:59 AM
Hi Milon,
I want to paste the Arduino source code in the LabVIEW.
Use a string constant and paste the code in there…
What should be the result from that Arduino code? Arduino is NOT the same as LabVIEW so what do you want to achieve with some Arduino code in LabVIEW???
Is there any option like formula node in LabVIEW for this purpose.
Use a string constant (or even a comment in the block diagram)…
04-25-2019 03:25 AM
Respected Mr. Gerd,
Sorry for the misunderstanding. During the coding using Arduino options, we usually follow this sequence: init>set pin mode>read/write pin>close. As I have Arduino source code, I don't want to follow this sequence. I want to know, does LabVIEW have any option like 'formula node.vi', where I can paste/write the source code directly and that "vi" will give me the output result? Is it clear?
Sorry for my poor English and poor explanation.
04-25-2019 03:35 AM
Hi Milon,
Is it clear?
No, not yet…
does LabVIEW have any option like 'formula node.vi', where I can paste/write the source code directly and that "vi" will give me the output result?
What is the expected result?
Do you expect your LabVIEW VI to read/write any pins on your Arduino? If this is the case, then you need to use LINX instead of some "formula node"…
04-25-2019 07:14 AM
Respected Mr. Gerd,
I have attached two pictures here. 1st one is formula node and the 2nd one is Arduino code. I have pasted the Arduino source code into the formula node, although I know formula node will not work. I want to know, is there any coding process in LabVIEW where I can paste the Arduino source code and get output value according to the Arduino code?
04-25-2019 07:22 AM
Hi Milon,
I want to know, is there any coding process in LabVIEW where I can paste the Arduino source code and get output value according to the Arduino code?
The short answer is "No!".
The longer story is: LabVIEW cannot directly access any Arduino hardware, you need a (kind of) device driver. And I already mentioned that device driver: it's called LINX!
With LINX you can try to replace your Arduino code by LabVIEW code…
04-25-2019 09:09 AM - edited 04-25-2019 09:12 AM
No
A "Formula Node" is just that, a node for entering complex mathematical formulas into LabVIEW.
It is NOT an "Any text language Node" that can turn text based source code into LabVIEW or simulate that code running on a device.
Linx allows you to program Arduinos and other microcontrollers with LabVIEW instead of the native Arduino language