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: 

Darren's Weekly Nugget 12/07/2009

In many cases, I think that adding text comments to a LV BD is like a musician adding the letters of the notes to a piece of sheet music.  Eventually you learn to "read" in G and well-written code is pretty easy to follow.  Two notable exceptions are the state machine aka action engine and mathematical expressions.  To help with the latter, I dusted off a little utility to convert LaTeX expressions into PNG files.  If you think of paint when you see LaTeX, then this may not help you, but if you have been lucky enough to have written a thesis somewhere along the lines, then this little program is probably your friend.

 

Enter a LaTeX expression into the text box and run the VI.  It will wrap the \begin and \end statements and if you check the box the \begin and \end math statements as well.  It will chug through a few conversions and then spit back your PNG file.  Drag to the BD and you have one spiffy comment, beats what you get with that other equation editing program that you have to pay $$ for (IMO).

 

Make sure that your LaTeX (I use MikTeX) and Ghostview paths are entered in your 'Paths' system variable, you should be able to type latex, or gswin32c at any command prompt.

 

LaTeXtoPNG.PNG

 

Message 11 of 15
(1,876 Views)

Note that you can put animated GIFs on your block diagrams as well. I don't know how much this helps with documentation, but we have code with a picture of a burning computer on the BD. 🙂

 

 

     Rob

0 Kudos
Message 12 of 15
(1,856 Views)
That burning computer is perhaps a reminder that animated GIFs are notorious CPU hogs....
Message 13 of 15
(1,852 Views)
Microsoft Word and OpenOffice both have equation editors which can be used to produce nice equations without learning LaTEX, although one could argue that learning to use them is as bad as learning to use LaTEX.  I used a similar system (RUNOFF) for my master's thesis and am very glad I had Word 2.0 and a Macintosh Plus to do my PhD.
0 Kudos
Message 14 of 15
(1,794 Views)

DFGray wrote:
Microsoft Word and OpenOffice both have equation editors which can be used to produce nice equations without learning LaTEX, although one could argue that learning to use them is as bad as learning to use LaTEX.  I used a similar system (RUNOFF) for my master's thesis and am very glad I had Word 2.0 and a Macintosh Plus to do my PhD.

That reminds me!

 

For my "Measure the diameter of a Pretzel" app where I had to use GPS to charaterize the turning radius of surface vessels...

 

Ben3.jpg

 

I had to do some math so I used a two frame seq structure, one frame for the code and the other for my math

 

 

Page_0.PNG 

 

Page_1.PNG

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 15 of 15
(1,781 Views)