LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start arduino program with Labview

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(4,003 Views)

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.

0 Kudos
Message 2 of 7
(3,952 Views)

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 :

 µCode c.PNG

 

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.

0 Kudos
Message 3 of 7
(3,935 Views)
Solution
Accepted by topic author AurelienNicol

@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.

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

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.

0 Kudos
Message 4 of 7
(3,926 Views)

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.

0 Kudos
Message 5 of 7
(3,924 Views)
Solution
Accepted by topic author AurelienNicol

@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

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 7
(3,918 Views)

Ok, I take note, thank you 😃

0 Kudos
Message 7 of 7
(3,910 Views)