LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 02/23/2009

Changing the Coersion dot color is a great Idea - I use an obnoxious magenta color so that it stands out like a sore thumb.  At least the default is red instead of the old grey that was hard to see.

 

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 11 of 36
(1,993 Views)

Wiebe@CARYA wrote:

Another thing I really don't get is that the maximum nuber of undo's is set
to 8 by default... I usually put it to 80 or something...


Wiebe, you can put the maximum value as 99. It wont go more than that...

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 12 of 36
(1,948 Views)

"parthabe" <x@no.email> wrote in message
news:1235632226064-860655@exchange.ni.com...
> Wiebe@CARYA wrote:
> Wiebe, you can put&nbsp;the maximum value as 99. It wont go more than
that...

Parthabe,

I never bothered to find that out. Anything between, lets say, 40 and 99 is
fine by me. What happens when you open the ini file and put it higher? I bet
the limit is just a numeric control limit, but it might be a hard coded
limit in the undo routines.

In practice, the undo cache is often cleared by several actions, so most of
the time you can't use the full cache size anyway...

Regards,

Wiebe.


Message 13 of 36
(1,941 Views)
But somehow I feel that the we ll have deviated from the very purpose of this nugget. Smiley Indifferent
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 14 of 36
(1,931 Views)

"parthabe" <x@no.email> wrote in message
news:1235646629323-860812@exchange.ni.com...
> But somehow I feel that the we ll have deviated from the very purpose of
this nugget. Smiley Indifferent

All we have to do is come up with a relation between max undo steps and case
structures, and we're on toppic again.

Hmmm. Let me think about it for a while. I'm sure we can come up with
something!


0 Kudos
Message 15 of 36
(1,927 Views)
Darren,

Didn't realize Aside #1 would elicit such fervent responses.  Good thing we're all ultimately on the same team (G)... which leads me to Aside #2.

Aside #2 (Case Structure related)
I've started using LITs (Linked Input Tunnels), which are universally liked (just being an instigator).  Anyhow, for simplicity, lets say you have a state machine where a 100 item enum feeds into the selector terminal of the case structure.  Maybe there are 40 cases that are actually used, and the other 60 are optional cases that may or may not be used in this application (but you like to keep a standard name set of about 100).  If you wanted to delete a particular case, you would right click the case structure border and select "Delete This Case".  Well, what if you thought that's what you did, but you acutally moved one item lower in the shortcut menu and selected "Add Case for Every Value"?  You continue coding and being a compulsive saver, like me, you realize the mistake later.  So, you think:  "No problem, I'll just 'Remove Empty Cases' -- I am the Nugget Master afterall.  Uh Oh.  Hmmm where'd 'Remove Empty Cases' go?"  Then, it hits you.  All the "empty" cases now have wires because of the LITs.

For the good of (G), I wonder if one of these might be in order:
1) "Remove Empty Cases" removes empty cases and cases with just wires.  Developers would then need to use this selection more carefully.
2) Overhaul the "Rearrange Cases" dialog:  Add a Delete button and allow us to select multiple cases in that dialog.

Just a thought...

-Jason

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
Message 16 of 36
(1,905 Views)

Thanks for pointing out Linked Input Tunnels.

 

That was the first I had seen or heard of them.  I must have missed it in the What's New Screen.  And I really don't recall anyone mentioning them on the forums before, other than some old threads were people were wishing for them.

0 Kudos
Message 17 of 36
(1,900 Views)

Well, what if you thought that's what you did, but you acutally moved one item lower in the shortcut menu and selected "Add Case for Every Value"?  You continue coding and being a compulsive saver, like me, you realize the mistake later.  So, you think:  "No problem, I'll just 'Remove Empty Cases' -- I am the Nugget Master afterall.  Uh Oh.  Hmmm where'd 'Remove Empty Cases' go?"  Then, it hits you.  All the "empty" cases now have wires because of the LITs.


 

I'm not positive, but I think VI Analyzer can detect the cases with nothing but wires running through it as 'unused code'.  If you've got 40+ of these, then you would have to set the threshold to more than 5 to find them all at once. It doesn't fix the problem, but can help you find the mistake if you didn't already notice it.  As for being a compulsive saver, just let "Automatic Saving for Recovery" save when you run the VI instead.

 

I never took Latin (De gustibus non est disputandum) but love jokes. As for adding all the cases at once for an enum:

Patient: "Doctor, doctor! it hurts when I do this!"

Doctor: "Don't DO that!"

I'm upgrading from 7.0 to 8.6 and modified our state machine templates to use auto-linked wires. I haven't released these to the group yet, and now I'm wondering if I should take them out!

Message Edited by Phillip Brooks on 02-26-2009 09:33 AM
Message 18 of 36
(1,894 Views)

I rarely use linked tunnels, what I might do after I set up a state machine, is link and wire tunnels so every case is linked, then I remove the 'auto-wire' function.

It is a bug-prone tool, just like 'use defaults if unwired'. It doesn't trigger you when you edit a state machine. The same goes for the 'default' value that per default is added to the first case of a case structure, changing a boolean structure to an enum structure with 'default' enabled is bad (IMHO), just as 'false' and 'true' are values for string controlled case structures.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 19 of 36
(1,881 Views)

LabBEAN wrote:

2) Overhaul the "Rearrange Cases" dialog:  Add a Delete button and allow us to select multiple cases in that dialog.

Just a thought...

-Jason


Excellent suggestion, Jason! Smiley Happy

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 20 of 36
(1,845 Views)