04-26-2010 01:02 PM
tbob wrote:...
How do you point to a particular post instead of the first one on a page?
Message Edited by tbob on 04-26-2010 10:54 AM
Good! It about time you build-up your "brag-list".
I can't say it works but what I do is...
1) Click on the number under your icon for the post you want. The screen will update and somewhere in the URL is will record the post #.
2) NOW copy the URL and prceed as normal.
Ben
04-26-2010 01:06 PM
Yep. That works. Thanx, Ben. I'm simply amazed at the fact that I seem to learn something new every day here. What a great group of guys.
04-26-2010 02:46 PM - edited 04-26-2010 02:47 PM
Ben wrote:I thought about this this week-end.
WORM globals - (Write Once Read Many) globals are a safe use of globals provided you and only you are the developer and you remember that you used globals and already used-up your allotment of write globals.
Ben
But how many times have you thought you were that person, and it ended up not being the case? Since Notifiers, lossy Queues, and AE's are so easy to use, I just don't think I'm on board. That global will be misused by someone. (Matches laying around )
04-26-2010 02:50 PM
04-26-2010 02:53 PM
Time for another idea submission...
Who gets this one? Broken Arrow or wormy tbob? 😉
04-26-2010 02:55 PM
Broken Arrow wrote:
Wait a minute. How about a true WORM Global that only allows one write? Subsequent writes cause a Broken Arrow.
Impossible due to the ability to dynamically load VIs.
In the past I've suggested a global read-only VI which would include a diagram which would run once when the code starts running, but this suggestion has its own issues.
04-26-2010 02:58 PM
tst wrote:
Broken Arrow wrote:
Wait a minute. How about a true WORM Global that only allows one write? Subsequent writes cause a Broken Arrow.Impossible due to the ability to dynamically load VIs.
In the past I've suggested a global read-only VI which would include a diagram which would run once when the code starts running, but this suggestion has its own issues.
I think it's a pipe-dream, but couldn't the global be registered on the computer? You would never even be able to name another Global the same again!
04-26-2010 04:12 PM
tst wrote:
Impossible due to the ability to dynamically load VIs.
That thought crossed my mind when Broken Arrow mentionned "broken arrow".
Now, maybe the folks at NI can come up with some sort of locking mechanism (not necessaruly a semaphore) that would allow to change once and then it is read-only.
It certainly would be a nice feature and then we would say Globals are good.
They do have a function called "First Time?", so maybe they could implement it using some similar mechanism.
Now back to Broken Arrows suggestion...
I was thinking that he meant that if you use a global variable and wrote to it somewhere in the project that the next time you select the global and tried to wire to it, it would give you a broken arrow and a broken wire. I don't know how that could be implemented, but we've seen other rabbits being pulled out of a hat, so maybe it is not so impossible to implement.
04-26-2010 04:36 PM
Well, C/C++ has constants. Why can't LV have constants in the form of Globals which cannot be written to from any block diagram. You would be able to create the Global variable using the standard method. All globals could be changed in the Global VI by the developer. But those globals would be read-only anywhere inside any block diagram. The Change to Write would be greyed out. It is not a WORM Global, but it would be a constant. 99% of my global uses are like constants. More people would use them if they were not writeable, and they are so much more easier than using Queues, Notifiers, or AEs.
04-26-2010 04:52 PM
tbob wrote:Well, C/C++ has constants. Why can't LV have constants in the form of Globals which cannot be written to from any block diagram.
You mean like this?