BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (8/15/09)

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? 

Message 1 of 10
(13,464 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 10
(13,418 Views)

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?

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 10
(13,401 Views)

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

Message 4 of 10
(13,323 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(13,306 Views)

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

Message 6 of 10
(13,298 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 10
(13,291 Views)

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

0 Kudos
Message 8 of 10
(13,286 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 10
(13,283 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(13,218 Views)