LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi guys! Can you use VISA blocks to control a third party device?

I know I can use Linx  drivers to control arduino, but I was just curious if I could use VISA alone without having to do arduino code integration. All I was trying to do is turn ON and OFF an LED using a boolean (see attached VI) .

The reason I asked this question is because of this youtube video I watched. Click link:  https://www.youtube.com/watch?v=pwapnMTEeZg

The guy in the video is able to read thermocouple temperature using VISA alone. So I thought maybe VISA could be used to control a third party device as well.

Or is VISA only used to check communication?

0 Kudos
Message 1 of 9
(1,172 Views)

If the device has a serial port, parallel port, GPIB or network interface than you can use VISA to communicate with the device. Though I generally will use the TCP VIs when communicating via a network. So, the answer to your question is, it depends on the device. Most devices will have some type of communication interface. Those that don't will usually have digital I/O inputs to control the device. In that case you would need to use some intermediary device such as an Arduino or a NI DI/O device.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 9
(1,161 Views)

yes you can! you just need to know what to send and what are you receiving.

know the serial monitor from arduino IDE? if you are sending a packet of data through serial (USB this case) you can use visa to receiva the same data in LabVIEW, without using LINX.

 

LINX have VISA inside to communicate with arduino, and can make it easier to integrate I/O, but if you can develop your code in arduino (and any other devices) you can also connect using VISA.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
Message 3 of 9
(1,109 Views)

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

 

  1. Program the Arduino in the native Arduino language.
    1. LabVIEW can communicate with an Arduino using VISA just like any other instrument on a serial port.
    2. 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.
    3. I highly recommend watching this video on serial communications: VIWeek 2020/Proper way to communicate over serial
  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/LabVIEW 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 those annoying bugs are here to stay

 

========================
=== Engineer Ambiguously ===
========================
Message 4 of 9
(1,088 Views)

I can easily interface arduino with labview using makerhub. The only problem I have is sending data to the cloud using wifi. 

I was doing research and I found out Arduino has a wifi module ESP8266. I'm also doing research to learn more how I can interface Arduino + ESP8266 with LabView without having to programming in Arduino IDE. 

 

Can you, guys, guide me?

 

Thanks,

 

GRCK5000

 

~Your VI has more race conditions than the Olympics and no amount of deeply stacked sequences can fix that~

 
 
0 Kudos
Message 5 of 9
(1,064 Views)

Can you explain how you'd like your system to work a bit more?

 

As far as I know, you can't run a LabVIEW program on an Arduino by itself- you need a computer hooked up to it. If you have a computer hooked up to it, then just use the computer to upload data to the cloud. I'm not sure where the ESP8266 comes into play.

 

If you want a standalone Arduino program running with Wifi access, then you're going to have to do that by programming with the Arduino IDE (or another compatible IDE, but the Arduino one is the simplest way to get your feet wet).

 

Just FYI, the ESP8266 is a full microcontroller, not just a wifi module. I'd recommend just programming the ESP8266 by itself (which you can also do with the Arduino IDE).

 

The last thing you'll need is a cloud to upload to. Do you have a spot already? If not, I'd recommend the Adafruit MQTT service. IIRC it has a free version you can upload some data to, and MQTT is very easy to use. You could also do something like a cloud-based Google spreadsheet but that's a bit more complicated to set up.

 

If you truly want a cheap, standalone device running LabVIEW with internet access, look into using the LINX toolkit with a Raspberry Pi. I haven't done it myself but I'm pretty sure it can actually run LabVIEW code standalone, unlike an Arduino.

Message 6 of 9
(1,041 Views)

@GRCK5000 wrote:

I can easily interface arduino with labview using makerhub. The only problem I have is sending data to the cloud using wifi. 

I was doing research and I found out Arduino has a wifi module ESP8266. I'm also doing research to learn more how I can interface Arduino + ESP8266 with LabView without having to programming in Arduino IDE

 

Can you, guys, guide me?

 
 

Frankly if there is no direct support for your peripheral in LINX then you might as well consider it unsupported. 

 

IMHO: You are going to have to program the Arduino in its native language using the Arduino IDE and then use VISA to communicate with the Arduino from LabVIEW just like any other instrument on a serial port.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 9
(1,034 Views)

Hi GRCK,

 


@GRCK5000 wrote:

I'm also doing research to learn more how I can interface Arduino + ESP8266 with LabView without having to programming in Arduino IDE. 


Apparently you already forgot the answer you received last week for basically the same question…

(Why start a new thread?)

Best regards,
GerdW


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

wow interesting

0 Kudos
Message 9 of 9
(1,000 Views)