LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Ever had a huge Enum to populate which might change occasionally? Have a text file with all the stuff you need? Great! Just populate the Enum using the []Strings property. ... Not so fast. An Enum must be defined before run time, or shall we say, Open time. Here's how to do it:

 

Create a VI that opens the VI containing the Enum using Server, then populate []Strings using references.

 

Enum Setter.png

 

 

 

 Parts_List.png

Richard






Message 21 of 361
(8,339 Views)

When a LabVIEW "switch" control has its Mechanical Action set to Switch When Released, you'll notice that it stops half-way as you hold it in. These transitional states can be read and used to fire code by simply reading the boolean text programmatically. Optionally, I am also taking advantage of four different colors that can be applied to the switch as it changes state.

 

 

BoolDemo.png

Richard






Message 22 of 361
(8,239 Views)

This question reminded me of a little Micro-Nugget regarding strain gauge measurements. If you use the Bridge Offset Nulling VI, you can use a Property Node to view the values of the on-board potentiometers after the calibration has taken place. What value does that have? Write these values to a file (append) and, over time, view the trending of your offset. I have over two years of offset nulling data which I have used for things like finding increasing side loads on the sensor, and improper installation.

 

ShowPots.png

 

 

Richard






Message 23 of 361
(8,149 Views)

Nice one BA.  Another reason to monitor this is that one of the first signs of permanent physical damage to a strain gauge is a change in offset. 

Message 24 of 361
(8,140 Views)

Not sure if it was somwhere or not, any way, I using it time to time:

 

screenshot.png

Andrey.

 

Message 25 of 361
(8,132 Views)

That's pretty cool.  The same feature for coerced numerics would be nice. 

Jim

LV 2020
0 Kudos
Message 26 of 361
(8,122 Views)

 


@lmtis wrote:

That's pretty cool.  The same feature for coerced numerics would be nice. 


 

That can be done with Type Conversion RCF PlugIn

 

But String to Path / Path to String conversion is "embedded" LabVIEW feature.

 

Andrey.

0 Kudos
Message 27 of 361
(8,110 Views)

Turn your TypeDefs into OOP Classes easily with this Right Mouse Button feature in Project...

 

1.png

 

2.png

 

 

Now get started with OOP by creating Accessors!

 

3.png

 

Good luck, have fun.

Richard






Message 28 of 361
(7,959 Views)

Communicating between two loops seems to be coming up a lot lately, so I thought I'd post my example.

Download all three files in one folder. Run the VI named Communicating Between Loops.

 

p.s. "Bad" ways, as well as "good" ways to pass data are shown; however, they all have their place, except the Global. Smiley Tongue

 

I strongly recommend the Queue and or Notifier.

 

Richard






Download All
Message 29 of 361
(7,590 Views)

Hi Broken Arrow,

 

Good work on the communicating between loops vi. As you say this is always asked on here so needs covering. One thing i would suggest for your examples is perhaps a small write up next to each example explaining when and when not to use them. As you say there and good ideas and bad ideas on there, maybe an idea to highlight the Dont's. Just a thought, Good job Smiley Happy

 

Regards,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 30 of 361
(7,528 Views)