05-11-2017 03:06 AM - edited 05-11-2017 03:07 AM
Hello everyone,
I would like to know if it's possible to launch an arduino program which is already stock in its memory with Labview, and obtain the feedbacks.
I have already seen some example with Raspberry Pi instead of Labview using I2C protocol. Is there anything like that in Labview?
(I don't talk about programing with Labview an Arduino controler, I want to lanch an existing arduino program by Labview.)
Best regards
Solved! Go to Solution.
05-11-2017 10:37 AM
Can you edit the existing program on the Arduino? Cause it might be easiest for it to just monitor the serial data and when it sees a specific command, it jumps to that part of the program starting it up. Then on the LabVIEW side all you have to do is send that command over a COM port.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-12-2017 05:17 AM
Hello, and thank you for your answer,
I have any program for the moment, I asked this question to know if it could be work. Because I’m better in C programing than Labview (I’m beginner ^^), but Labview is more powerful than an arduino.
To explain my goal, I have to program an automaton using a servomotor, a power, measuring instruments (Dielectrimeter and Ohmmeter), few other devises … and RGB LED band. Moreover, I will have to send back the measuring information to an Excel (Labview is very efficient for that).
So for the moment I try to find the different devises which will be available on Labview by means of labview driver. But sometime the devise doesn’t have labview driver and all the programing information are in C language.
Command example :
Therefore my idea was to talk to the device in C language, but lunch this program with Labview and obtain the feedback information in Labview.
So you talk about exactly what I would like ! 😃
But how can I send the specific command to jump to the arduino program ? What is the command type ?
When you talk about COM port, you mean USB or RS232 or something else ? I have heard about I2C port to communicate with arduino.
And thank you again for your answer.
05-12-2017 08:01 AM
@AurelienNicol wrote:
Because I’m better in C programing than Labview (I’m beginner ^^), but Labview is more powerful than an arduino..
And a pencil is more powerful than a glass of milk but I'm not sure where the comparison comes from. If you are looking for some free training, or just to see what is possible, there are a few training videos on Youtube to get familiar with LabVIEW. Here are the basic training links set around.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
Now as for your issue it still is not clear what your requirements are, or what you are trying to do. Do you just want to have an Arduino do work that your LabVIEW program asks it to do? If so look into LIFA which is the older Arduino toolkit for LabVIEW, or LINX which is a more complicated, but more feature rich toolkit. Both will put a known firmware on the Arduino and allow you to talk to it using standard commands, and functions that are already written. I believe there is functions for controlling servos already written. The LINX site also has lots of youtube videos showing how to set it up and use it. Both LIFA and LINX will talk to an Arduino on a COM port which is how an Arduino will appear when plugged in over USB. Your OS will first needs your USB drivers.
The Report Generation Toolkit is include in several versions of LabVIEW and can make Excel files. If you don't have this you can still make text files and have Excel open them but you won't be able to make fancy things like graphs or formulas.
As for talking to devices over some standard SCIP commands, I'd recommend starting with the Simple Serial example. This is in the Help >> Find Examples then search for Simple Serial. It shows how to open a serial port, send some command, wait a bit, then read the response. The LIFA and LINX functions basically call these functions to get the work done.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-12-2017 08:22 AM
Ok thank you, I will explore your different propositions as the LIFA and follow your training links. My first asking was to know if that was possible, and where can I find information about it, because I didn’t know the vocabulary to find the good topic. So now a first step is done and thank you.
05-12-2017 09:19 AM - edited 05-12-2017 09:20 AM
@AurelienNicol wrote:
Ok thank you, I will explore your different propositions as the LIFA and follow your training links.
FYI: LIFA was deprecated a couple years ago and replaced with LINX
05-12-2017 10:06 AM
Ok, I take note, thank you 😃