LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (9/2/2009)

No pretty pictures today, but a useful VI for graphing functions is "Eval y=f(x).vi"  It is great for creating your own graphing calculator VI, and there are several useful (and a few not-so-useful) VIs which take advantage of formula strings.  The advantage over something like a formula node is that you can change the formula at run time.  A small performance hit over hard-wired formulas, but usually well worth it in the right application.

 

Speaking of Formula Nodes, one of my biggest pet peeves with LV is that the exponentiation operator we know and love is really the 'Bit XOR' operator.  Not only is this different than any other language I have used (including early LV), how often are you using a Bit XOR anyway?  Now I am used to it so I had better learn to love 'y=x**2'

 

EvalExample.png 

 

Error? What, it's not even the same in other parts of LV?!!  Arghh..... 

 

As always, groundrules for VIOTD here

Message Edited by Darin.K on 09-02-2009 09:50 AM
Message Edited by Darin.K on 09-02-2009 09:52 AM
0 Kudos
Message 1 of 14
(4,174 Views)

Darin.K wrote:

Speaking of Formula Nodes, one of my biggest pet peeves with LV is that the exponentiation operator we know and love is really the 'Bit XOR' operator.  Not only is this different than any other language I have used (including early LV), how often are you using a Bit XOR anyway?  Now I am used to it so I had better learn to love 'y=x**2'


As a reference, here's a list of differences and limitations of the formula parser VIs.

 

 

 

 

Message 2 of 14
(4,131 Views)

I always try to avoid formula nodes, script nodes, ect, just because then I have to remember text programming syntax. :smileysad:

Sometimes its unavoidable, but I try to use LabVIEW natives if possible

But I agree, this function is very useful.

Message Edited by Cory K on 09-02-2009 01:24 PM
Cory K
Message 3 of 14
(4,108 Views)
I always start off in formula nodes and mathscript because it's a lot cleaner than LabVIEW for complex equations and things.  Then I translate to LabVIEW because in my experience mathscript is mega slow
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 4 of 14
(4,085 Views)

<historyMode>

 

The ** exponetial operator dates from FORTRAN.  C messed things up by using a different one. Smiley Very Happy

 

</historyMode>

Message 5 of 14
(4,045 Views)

DFGray wrote:

<historyMode>

 

The ** exponetial operator dates from FORTRAN.  C messed things up by using a different one. Smiley Very Happy

 

</historyMode>


<historyMode>

 

I have a book on a shelf in my library "FORTRAN-77". The "77" was for 1977.

 

So open Q to the community:

 

Where you a

 

Twinkle

  • in the eye of your parents 

 

or

 

Tween

  •  Alive but still young to program

 

or

 

Tweaker

  • Writting your own toggle-ins  

 

 

When that book was published? 

 

I was a Tweaker with about 3 months experience back then.

 

An old joke that has probably lost its meaning since then when hardware and software type only interacted by pointing at each other goes;

 

"Never trust a programmer that carries a pocket screw-driver!"

 

</historyMode>

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 14
(4,031 Views)

Good old Fortran...

 

I don't miss it.  

 

It's funny reading Darin's threads.  When I was first learning LabVIEW, I was experimenting with all the different functions, most of which I have forgotten over the years.  These threads remind me of that.  And it's a bit of a refresher..  😉

Message 7 of 14
(4,027 Views)
TWEEN - graduated high school and on my way to a Biology major and a career as a surgeon.  I did not start programming until four years later after I changed majors to Physics.  I learned FORTRAN IV (the predecessor to FORTRAN 77) for data acquisition and analysis of nuclear isotope spectra.
Message 8 of 14
(4,021 Views)

Ben wrote:

 

I have a book on a shelf in my library "FORTRAN-77". The "77" was for 1977.


Ben


I was 10 years down the road. 

 

I did do some programming in Fortran-90 about 5 years ago though

--
Tim Elsey
Certified LabVIEW Architect
Message 9 of 14
(4,019 Views)

Ha! I have a copy of my Fortran IV book from college (it wasn't the 1904 version!, it was back when Fortran, like previous LabVIEW, used version numbers rather than release year). A lot of various "things" have percolated through software from the early days. Many of the keyboard shortcuts, like ctrl C, ctrl V, etc., seem to have come from one of the first word processing programs WordStar, vintage late '70s, although there may have been earlier uses.

 

As an aside, I have been spending some time with a LabJackU3, an instrument that a current project uses has one of these DAQ units embedded within it, and was amused by a comment in the text file included with the LabVIEW library "At its core, LabVIEW is just a graphical representation of C or similar".

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 10 of 14
(4,015 Views)