01-05-2015 08:09 AM - edited 01-05-2015 08:16 AM
Thank you Richard,
Sorry for my ignorance. I have read this thread and in an excitement(I hope every first time user of LV feel the same) , typed my first reply here. I will consider looking in depth next on.
01-05-2015 08:59 AM
@DhruvAcharya wrote:
Thank you Richard,
Sorry for my ignorance. I have read this thread and in an excitement(I hope every first time user of LV feel the same) , typed my first reply here. I will consider looking in depth next on.
And even with the ancient LabVIEW versions that support VISA (very old VISA like whatever shipped with 6.i) You could use "Tools>>Options :Environment- check the box for "Automatically Close VISA Sessions" and VISA sessions will close when the top level VI goes idle.
Welcome to the forums!
01-09-2015 08:03 AM
I don't know about anyone else, but I was recently looking for a way to centre a VI in a subpanel and couldn't find anything. In my particular case I had a little spinning 'loading' indicator VI and wanted to have it centered in the subpanel it was loaded into.
This is the way I did it:
1) Centered my VI's front panel around the origin:
2) Create an event handler for the Pane Size event with the following:
When my VI is inserted into the subpanel or the subpanel/pane resizes (e.g. change window size) - the origin remains in the centre of the pane.
I found this very useful for when you have a resizeable user interface!
01-09-2015 08:28 AM
@Sam_Sharp wrote:
I don't know about anyone else, but I was recently looking for a way to centre a VI in a subpanel and couldn't find anything. In my particular case I had a little spinning 'loading' indicator VI and wanted to have it centered in the subpanel it was loaded into.
This is the way I did it:
1) Centered my VI's front panel around the origin:
2) Create an event handler for the Pane Size event with the following:
When my VI is inserted into the subpanel or the subpanel/pane resizes (e.g. change window size) - the origin remains in the centre of the pane.
I found this very useful for when you have a resizeable user interface!
Curious why you couldn't do "left minus right" and "top minus bottom" instead so you could avoid negating the answer?
01-09-2015 08:32 AM - edited 01-09-2015 08:32 AM
Yes, good point - I suppose I had better post this is in the rube goldberg code thread as well ![]()
01-09-2015 08:33 AM
Ehhh... I've done worse. 😉
01-09-2015 09:26 AM - edited 01-09-2015 09:27 AM
You might also want to try Quotient & Remainder instead of the Divide in order to avoid some of the data coercion. Or, since it is a divide by 2, use a a Logical Shift (would be less processor intensive if you are really going for any and all performance gains).
01-09-2015 09:32 AM
@Sam_Sharp wrote:
Yes, good point - I suppose I had better post this is in the rube goldberg code thread as well
I can't think that unnecessarilly flipping two sign bits would quite qualify. Mr. Goldberg would be very disinterested in the wasted energy![]()
01-09-2015 09:55 AM
@JÞB wrote:
I can't think that unnecessarilly flipping two sign bits would quite qualify. Mr. Goldberg would be very disinterested in the wasted energy
From a performance standpoint i agree, from a fanatic standpoint it's an extra block that's not needed (like when people wire a '0' constant to an Index array). The RGC is less than minor, thus a micro Rube, far from a slap on the wrist.
/Y
01-09-2015 10:54 AM - edited 01-09-2015 10:54 AM
Using the negate is better than simply dividing by minus two....