From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW with Microcontrollers

Good Morning.

 

We can program Arduino microcontroller using LabVIEW. Can other microcontrollers like 8051, PIC, ARM, etc be programmed too? (I am aware there are specific labVIEW modules for ARM like the labview embedded module, but just like Arduino does not require any additional software module of labVIEW, is it possible to program other microcontrollers too, with and without an RTOS?)

 

 

Kindly reply.

 

Thanks.

MV Pankaj Lahari

Message 1 of 11
(4,902 Views)
The arduino is NOT programmed with LabVIEW unless you have a fairly expensive add-in. The arduino is programmed with lifa or lynx, with a sketch that uses serial port connection to communicate with other programs such as LabVIEW. An important distinction.
0 Kudos
Message 2 of 11
(4,889 Views)

Thank you Sir for the quick reply. 

 

WIth NI VISA and VI package manager installed, through serial communication, it was able to program Arduino through LabVIEW vis. I wanted to know if in a similar way, other microcontrollers can be programmed. 

 

 

Thanks

MV Pankaj Lahari

0 Kudos
Message 3 of 11
(4,880 Views)

The Arduino is NOT programmed with LabVIEW.

With NI VISA you can talk to a arduino running a premade program, but all your LabVIEW program is only runing on YOUR PC.

 

You can do the same thing with other microcontrollers, as long as they have a serial connection.

But you still have to make a program for that microcontroller in a seperate programming tool.

0 Kudos
Message 4 of 11
(4,848 Views)

@dkfire wrote:

The Arduino is NOT programmed with LabVIEW.

 


That's not quite true any more: http://www.tsxperts.com/arduino-compatible-compiler-for-labview/

 

Before this came along, either a custom serial protocol or using the LINX/LIFA toolkits was the way to go. Obviously, a custom serial protocol can work with any microcontroller. 

 

You could probably figure out the protocol that LINX uses and emulate that on your non-Arduino microcontroller and use the toolkit on the LabVIEW side.

 

Oh...I doubt it but you might also be talking about programming/downloading the program file onto the device. If that's the case then you can normally do this through command-line tools with System Exec.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 11
(4,834 Views)

@Sam_Sharp wrote:

@dkfire wrote:

The Arduino is NOT programmed with LabVIEW.

 


That's not quite true any more: http://www.tsxperts.com/arduino-compatible-compiler-for-labview/

 

Before this came along, either a custom serial protocol or using the LINX/LIFA toolkits was the way to go. Obviously, a custom serial protocol can work with any microcontroller. 

 

You could probably figure out the protocol that LINX uses and emulate that on your non-Arduino microcontroller and use the toolkit on the LabVIEW side.

 

Oh...I doubt it but you might also be talking about programming/downloading the program file onto the device. If that's the case then you can normally do this through command-line tools with System Exec.


$499 for the Standard Edition?

 

I guess people will pay any sorts of money not to have to learn C   Smiley Wink

0 Kudos
Message 6 of 11
(4,801 Views)

True, but if you compare the cost of the license + 10 arduinos ($500+10x$25) versus 10 DAQ (10x$150 in the US?) or cRIO devices...it suddenly isn't such a silly idea! Smiley Wink

 

(OK, so there are obviously lots of other differences between human beings and animals that you should know about proper DAQ / RT cRIOs and an Arduino but still...)


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 11
(4,776 Views)

To a considerable extent, you get what you pay for...

 

Arduinos are considerably slower at ADC than even the lowest-end NI-DAQ devices. If you're using LINX, the query-response cycle time is of order 5 ms or so (LIFA is probably about the same, but I've never bothered to benchmark it), so if you're doing single-point sampling, figure 200 S/sec or thereabouts. You can do better if you sample into memory and then dump a bunch of points to the computer at a time, but doing a smooth stream is hard. It can be done (the boards support hardware-interrupt timing, so you can sample into an internal buffer on a regular cadence, and then have the transfer function send "whatever data is available" over to the computer at irregular intervals) but it takes a reasonable amount of low-level programming effort. Whereas with the NI device, someone else has done that work for you.

 

Now, if you're building say a datalogger that needs to query sensors once every ten seconds, the difference in peak sampling rate is irrelevant to you and an Arduino or comptible device is worth looking into. That's also true if being able to interface to other ICs is an asset; I'm not sure what the cheapest NI device that speaks I2C is, but I'm pretty sure it costs more than $20 or so. 

0 Kudos
Message 8 of 11
(4,767 Views)

@dmsilev wrote:

I'm not sure what the cheapest NI device that speaks I2C is, but I'm pretty sure it costs more than $20 or so. 


Probably the 8451 at about $450.  I developed some hardware around those devices, and as an experiment I replaced them with an Uno with LIFA.  Three VIs had to be replaced in my source, Open, Read/write, and Close.  Other than that the Unos did exactly what we needed for a lot less money.  Still this was a somewhat enclosed device, and we wanted the support that comes from NI if we had issues so we stuck with our original design, but had budgets been tight we probably would have gone with the Unos.  

 

They would be a lot more flexible too, we had a download sequence that would send a series of requests and replies to the DUT which would have to be software timed on Windows.  Had we used Unos we could have written our own firmware to send a single command to do the download, then send the whole thing back to Windows.

0 Kudos
Message 9 of 11
(4,762 Views)

@nyc_(is_out_of_here) wrote:

$499 for the Standard Edition?

I guess people will pay any sorts of money not to have to learn C   Smiley Wink


Considering LabVIEW starts at $999 and most people here are probly using a $2999 or more version and most NI add ons cost another $2000 each.

 

$499 is not that bad a price and it's a damn good product.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 10 of 11
(4,732 Views)