LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Realtime vs LINX Limitations

Hey guys, I've been using LabVIEW on "full fledged" systems (I don't really know the word for the category of computers that run windows) for some time and am now getting into using Arduinos and other microcontrollers. I understand that LabVIEW has a real-time deployment functionality as well as the LabVIEW LINX plug in.

As someone at a CLD-ish level, I'd like to know:

 

1) What is the difference between programming a traditional LabVIEW .exe deployment vs a microcontroller deployment? How different are the coding "best practices," between the two?

2) Are there any microcontroller-like devices or brands that are most compatible with LabVIEW? As someone with limited ability in (but desire to learn) C[any kind of symbol] which kind of devices will give me the most (bang+ease of use)/(buck)?

For context:
The motherboard of my 1980's treadmill finally died and I figure this would be a good time to learn more about integrated circuits and microcontrollers.

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

LabVIEW Real-Time does not run on Windows -- it requires a Real-Time Operating System (RTOS), which for Intel PCs means either PharLap (on PCs configured as Real-Time stations and on PXI Controllers) or an RT version of Linux (I don't remember NI's name for this).  The RIO architecture also has an RTOS (which I think is also Linux-based).

 

LabVIEW RT gets deployed to one of these RTOS-based machines via TCP/IP, which (always? sometimes?) serves as the communication channel between the two systems.  The deployed code is LabVIEW, either compiled for the RT system's hardware or interpreted by the RTOS and Run-Time deployed remotely.

 

Bob Schor

 

0 Kudos
Message 2 of 9
(5,078 Views)

Unless you really feel like spending a lot of money on your treadmill, you probably want to use an Arduino/Raspberry Pi or something similar.  I haven't used lynx, but if you wanted to program the Arduino/Raspberry Pi with LabVIEW, it seems that would be the thing use.  I believe Felipe Altoe has something that compiles LabVIEW directly for Arduino.  It's on the tools network and costs $99 if I remember correctly. Lynx I believe is free.  I remember playing around with lynx a long time ago and I thought that it required tethering the Arduino to a PC running LabVIEW.  I could be wrong on that.  That might have just been to get data off of it for display.  In  your case, you could probably just display data for your treadmill using the analog outputs or use I2C to talk to an LCD display.

 

If you want to use LabVIEW Real-Time then you have to buy NI hardware, such as an RT PXI chassis or CRIO.  My guess is that would be way too much money for a treadmill.  Compare those prices to $40 or less for a Raspberry Pi.  I believe the new Raspberry Pi zero is only like $5/$10.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 3 of 9
(5,050 Views)

So LINX generally doesn't mean, writing code that gets deployed to hardware.  The LINX toolkit has traditionally been about downloading some premade binary to an embedded device that will respond to known commands.  This is like the old LIFA toolkit for Arduino.  If you send a specific string command the microcontroller would read an analog and send the value over serial.  This type of programming is fine, but requires a PC (or a host) that talks serial to the device asking it to do things on software timing.

 

LINX recently added support for actually deploying code to Raspberry Pi and Beagle Bone Black (videos on that page are super useful).  Programming for this will be a more familiar experience to programming for other RT devices.  For any Real-time PXI, or NI RT devices (like myRIO, or embedded cDAQ, or cRIO) you will add the hardware as a target in your project.  There you can write normal VIs, and when you run, the VI is compiled for your target, downloaded, and ran remotely.  You can then compile the VI into an executable, and have it run on startup.  Now all that is needed is to turn on your device and it starts going.

 

Writing most G code for a Raspberry Pi using LINX, or writing code for any other NI RT device is going to be a similar experience.  The differences come in the OS, and IO capability.  The newer RT Linux stuff is amazing, because of the expandability.  Previously if you wanted to use some external software library (that wasn't a pure G toolkit) you'd be out of luck.  But with the newer Linux RT devices you can download programs made for the ARM, or x86 flavor of Linux you are running and do all kinds of things.  Ever want to run a normal Windows 32 bit binary like 7-zip on an RT target?  Install Wine and have fun!  Now you can have a deterministic, reliable OS, with some of the modern desktop functionality.  Similarly adding hardware support for other USB devices is closer to a reality now that a Linux OS has more support.

 

Oh and one other major limitation, is the LINX 3.0 with Raspberry Pi support is limited to LabVIEW 2014 only.  This is due to a bunch of work the NI team needed to do to add it as a target in project explorer.  Hopefully they can update this to 2017, and with the forwards compatible run time engine it might mean future versions can use it too without extra work with each release.

0 Kudos
Message 4 of 9
(5,047 Views)

The biggest difference I found between programming a traditional LabVIEW .exe deployment vs a microcontroller deployment is...

 

Most microcontrollers are single core and single threaded so your LabVIEW code has to be very linear which can be a big hurdle to overcome when you are used to multitasking.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 9
(5,022 Views)

Duplicate post: What's up with the board today?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 9
(5,021 Views)

@RTSLVU wrote:

Most microcontrollers are single core and single threaded so your LabVIEW code has to be very linear which can be a big hurdle to overcome when you are used to multitasking.


This varies with the microprocessor and processor of course.  The Raspberry Pi 3 looks like a quad core ARM, several embedded cDAQs are desktop CPUs, like Atom, i5 and i7, and other ARM based ones from NI (like myRIO) are multicore processors that I assume the LabVIEW compiler takes advantage of (but could be wrong).

 

But still the advice to not multitask too much, and monitor performance and usage is a good one.

 

EDIT:  Haven't posted much but haven't seen any issues today on the forums.

0 Kudos
Message 7 of 9
(5,013 Views)

Isn't there also a limitiation with Lynx that it may not be used for any commercial applications? And I think NI takes that pretty broad so if you use it in a company for anything but playing around for fun (and which employer is paying for that nowadays Smiley Very Happy) it is already commercial.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(4,988 Views)

OP mentioned a motherboard on a treadmill dying.  So I assume this is for personal use at home, but yes there is some kind of restriction like that.

0 Kudos
Message 9 of 9
(4,974 Views)