08-15-2009 02:33 PM
Bonus Saturday Edition:
New format, thread for individual VIOTD, tally in original thread. Keeps our thoughts on a given VI in a convenient spot.
The VI for today is "First Call?"
You find this one under the hood of a lot of the PtbyPt VIs, and seems natural for giving functional globals reasonable default values without requiring an explicit initialization. Any other interesting uses? Ever needed to do something special the first time a certain case is selected?
08-17-2009 08:20 AM
Darin.K wrote:Bonus Saturday Edition:
New format, thread for individual VIOTD, tally in original thread. Keeps our thoughts on a given VI in a convenient spot.
The VI for today is "First Call?"
You find this one under the hood of a lot of the PtbyPt VIs, and seems natural for giving functional globals reasonable default values without requiring an explicit initialization. Any other interesting uses? Ever needed to do something special the first time a certain case is selected?
Yes Sir!
Here you will find mention of a self-inititalizing Action Engine that uses the First Call? Function to determine if we init or not.
Ben
08-17-2009 01:55 PM
First Call can be used with any LV2 style global variable in the same manner as shown by Ben. I've done this many times.
Question: Does the Labview engine really count how many times a subvi has been called? Or does it just have a flag for each subvi for first call?
08-27-2009 05:53 PM
I know that I'm jumping in late now that I'm back from vacation...
But, be careful with the First Call function. Especially in RT. It may not always work as expected.
In RT you can stop a VI and restart it and First Call will not go true (well, not always anyway). We've run into a few problems this way with initializations not being what we thought they should be.
Rob
08-28-2009 07:31 AM
Robert Cole wrote:I know that I'm jumping in late now that I'm back from vacation...
But, be careful with the First Call function. Especially in RT. It may not always work as expected.
In RT you can stop a VI and restart it and First Call will not go true (well, not always anyway). We've run into a few problems this way with initializations not being what we thought they should be.
Rob
Hi Rob,
I read that post like "BTW: I have noticed that drinking milk will sometimes induce spontaneous combustion."
Please tell me you were able to duplicate this behaviour and you have reported it to NI.
Please,
Ben
08-28-2009 09:33 AM
Yes, it was reported to NI.
It is very reproducible. It happens about 1 out 4 times in cRIO (maybe I should not have generalized about RT). We have not gotten it reproducible in a PC and the person who says they saw it has not been able to reproduce it on his PC either.
And, I'm not sure how I came across that way. What did I say that made you think I was doing less than being informative?
Rob
08-28-2009 09:45 AM
Robert Cole wrote:Yes, it was reported to NI.
It is very reproducible. It happens about 1 out 4 times in cRIO (maybe I should not have generalized about RT). We have not gotten it reproducible in a PC and the person who says they saw it has not been able to reproduce it on his PC either.
And, I'm not sure how I came across that way. What did I say that made you think I was doing less than being informative?
Rob
Thank you for the extra info!
My CRIO guys will definatley want to hear about that.
RE: Came across...
It was less the way you presented it but more how I read it. It was my "eye opener" that comes along with my coffee and reading the forums.
You don't have the CAR number by any chance?
But agian,
Thank you for sharing that info!
Ben
08-28-2009 10:04 AM
I'll check with the guy who was taking this up with NI and see about getting the CAR number.
I've wondered about putting messages up on the forums about some of the bugs we've brought up with NI. I'm the only one in our office who regularly checks the forums and I'm certainly not the only one using NI support to report bugs. In fact, I have not put bug reports on the forums for things I've brought to NI's attention.
Rob
08-28-2009 10:11 AM
Robert Cole wrote:I'll check with the guy who was taking this up with NI and see about getting the CAR number.
I've wondered about putting messages up on the forums about some of the bugs we've brought up with NI. I'm the only one in our office who regularly checks the forums and I'm certainly not the only one using NI support to report bugs. In fact, I have not put bug reports on the forums for things I've brought to NI's attention.
Rob
Thank you.
My situation is similar to yours in that I do report but I don't post them unless someone else stumbles across the bug. many of the bugs I find and report are trivial or just annoying to me so most do not want to read them anyway.
Ben
09-03-2009 01:16 PM
FYI
One of the other Architects i work with just reported that they think they saw the "First Call" node fail on a cFP unit.
Ben