LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

I've seen examples where the Font Number is "0" -- could this be Current Font?

0 Kudos
Message 161 of 368
(2,429 Views)

If handling timings, Get date/time in seconds is very unreliable and can cause some ~10ms errors compared to Get Tick count.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 162 of 368
(2,351 Views)

@Yamaeda wrote:

If handling timings, Get date/time in seconds is very unreliable and can cause some ~10ms errors compared to Get Tick count.


Don't forget "High Resolution Relative Seconds.vi" found in .../vi.lib/utility. Another good option, especially for benchmarking.

Message 163 of 368
(2,340 Views)

This enables micro second benchmarking and time period calculation. Great Christian.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 164 of 368
(2,327 Views)

I posted this tidbit in an undisclosed location so I'll repeat it here in the open for everyone else.  If you have some code involving arrays of various dimensions and decide later to wrap it in a For Loop you get all autoindexing tunnels.  This might be ok, but many times I only want a small fraction of them to autoindex, so there is a lot of right-clicking going on.  As an alternative I will wrap the code in a While Loop instead and then Right-Click and Replace With For Loop.  Now all of the tunnels are non-indexing and I only have to change a small number of them.

 

WrapWithWhileLoopNugget.png

Message 165 of 368
(2,276 Views)

@Darin.K wrote:

....  As an alternative I will wrap the code in a While Loop instead and then Right-Click and Replace With For Loop.  ...


 

Ah the old "wrap and switch" trick. Nice!

 

I never thought of that (it hard to think clearly when you are cussing quietly to yourself) but it will definately save me some time!

 

Thank you!

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 166 of 368
(2,260 Views)

You can put constants on the front panel (they act like controls), and controls on the block diagram (they act like constants).

Most of the aren't too useful, but here are two that I like: A boolean constant on the FP makes a cute control, and a labeled square button on the BD is neat because it has boolean text.

Message 167 of 368
(2,169 Views)

Cute. How do you do that though? If I drop a constant on the FP, it turns into the default Boolean control and if I drop a Boolean control onto the BD, it turns into a constant...

0 Kudos
Message 168 of 368
(2,166 Views)

I just figured out how to turn on the boolean text for an ordinary boolean constant.

0 Kudos
Message 169 of 368
(2,153 Views)

Same comment. And check your subject (see this?)

0 Kudos
Message 170 of 368
(2,143 Views)