LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading String from Arduino

I am having trouble reading from the Arduino to LabVIEW. I have downloaded linx and Maker hub and also have just used LabVIEW's methods as well. It turns out to be unsuccessful. I am wondering if someone could help me understand what I am doing wrong. I run the code and I do not receive anything in the string box.  i have attached an image of the setup I have. I will attach the VI however I am using the newest version of labview.

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

Hi ikw,

 

in your image you show the receiver part of the communiction.

What does the sender part look like? Which data does the Arduino send?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,326 Views)

What I am showing you is what I have currently. Am I suppose to have a sender? 

0 Kudos
Message 3 of 8
(1,318 Views)

Hi ikw,

 


@ikw123 wrote:

Am I suppose to have a sender? 


When you want to receive data from your Arduino, then your Arduino needs to send some data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,295 Views)

Most serial communication issues can be solved by watching this video: VIWeek 2020/Proper way to communicate over serial

 

That being said communication with an Arduino is no different than communicating with any other instrument on a serial port. IMHO: It should be easier because you have full control of what the Arduino is sending, how it it formatted, serial protocol, etc.

 

You are the one programming the Arduino, right?

 

Also GerdW is right to give you any real answers we need to know what the Arduino is sending and how it is formatted.

 

BTW: I can't look at your code because we are frozen on LABView 2021 due to the new SaaS billing model NI has implemented in LABView 2022 forward. SO you will probably find more support on this board if you save your code for LABView 2021. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(1,271 Views)

@ikw123 wrote:

I am having trouble reading from the Arduino to LabVIEW. I have downloaded linx and Maker hub and also have just used LabVIEW's methods as well. It turns out to be unsuccessful. I am wondering if someone could help me understand what I am doing wrong. I run the code and I do not receive anything in the string box.  i have attached an image of the setup I have. I will attach the VI however I am using the newest version of labview.


What are you expecting the Arduino to be sending you?

 

If you have just loaded the LINX firmware then it isn't going to send anything to the receiving computer with being sent some command. If you have programmed the Arduino with custom code then you should know what it is doing.

 

BTW, if you are on the newest version of LabVIEW then you should be using the Hobbyist Toolkit instead of LINX.

 


@RTSLVU wrote:

 

You are the one programming the Arduino, right?


If they are using LINX, probably not.

0 Kudos
Message 6 of 8
(1,266 Views)

@JimB. wrote:

BTW, if you are on the newest version of LabVIEW then you should be using the Hobbyist Toolkit instead of LINX.

 


@RTSLVU wrote:

 

You are the one programming the Arduino, right?


If they are using LINX, probably not.


Well the picture of their code was using VISA serial so I they are not using LINX or at least weren't then. 

 

LINX is the "Hobbyist Toolkit"

LINXCapture.PNG

 

To the OP: 

In general there are three ways of using LabVIEW with an Arduino

 

  1. Program the Arduino in the native Arduino language and use LabVIEW to access the Arduino using VISA just like any other instrument on a serial port.
    1. IMHO: this is the best way as you have full control over the communications protocol and access to all of the of Arduino libraries and LabVIEW toolkits that are already out there.
  2. Use LINX (LIFA has long since been deprecated)
    1. Full LabVIEW integration, but limited amount of Arduino libraries and peripherals directly supported
    2. The Arduino basically becomes a tethered DAQ device that needs to be connected to a computer to work
  3. TSXperts Arduino compiler for LabVIEW
    1. Actually turns LabVIEW into compiled Arduino code. (A real feat on its own)
      1. Limited subset of LabVIEW vi's and primitives
      2. Very limited support for Arduino libraries 
      3. Development seems to have stopped, so all those annoying bugs are here to stay
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 8
(1,246 Views)

@RTSLVU wrote:

@JimB. wrote:

BTW, if you are on the newest version of LabVIEW then you should be using the Hobbyist Toolkit instead of LINX.

 


@RTSLVU wrote:

 

You are the one programming the Arduino, right?


If they are using LINX, probably not.


Well the picture of their code was using VISA serial so I they are not using LINX or at least weren't then. 

 


Their original post stated, "I have downloaded linx and Maker hub and also have just used LabVIEW's methods as well."

 

I don't know what they are doing. What program the Arduino is intended to be running, or that they know it must be programmed to run one, is pretty unclear.

 

 


@RTSLVU wrote:

LINX is the "Hobbyist Toolkit"

LINXCapture.PNG


 

The Hobbyist Toolkit was LINX. The joys of acquisitions and name changes...

 

Digilent's LINX has joined LIFA in the "deprecated" club: https://www.vipm.io/package/lvh_linx/

 

NI's LINX hasn't been updated since it's initial release on June 1, 2020: https://www.vipm.io/package/ni_labview_linx_toolkit/

 

NI's Hobbyist Toolkit is distributed via NIPM: https://www.ni.com/en-us/support/downloads/tools-network/download.labview-hobbyist-toolkit.html#4778...

 

I haven't used these enough to know if there is a significant difference between the last two aside from package manager. IIRC, the name change and move to NIPM coincided with the launch of LabVIEW Community Edition.

0 Kudos
Message 8 of 8
(1,229 Views)