08-28-2007 07:40 AM
@Ben wrote:
Mike Porter and I spoke off-line about how this technique can also act as front end to a DB (Is anyone shocked MP would like this idea ) ?
.... to almost quote tst ...
Shocked?? Absolutely NOT!!. I can't get that thought out of my mind.. I never dared share it fearing I would be stoned.. (as in getting rocks thrown at me..)
As a matter of fact, I am tempted to create not just the front end, but also the engine for a... DB. Many years ago, during a summer job, I had to write a DB program. That was before the DB program became popular from Borland (now that has to trigger memories with old timers). Ah... the good ol' days! No MSuff crap.. Didn't need 2GB of RAM to run a program.. let alone load an OS.
😄 😄 😄
OK let's see the spin-off potential nuggets from this one.
- Using XML as an alternative to ini files
- Using HDF5 as an alternative to ini / config files (and now why not DB??)
- Creating a database (engine) with LV (probably already exists... I'm not talking about linking to SQL or Oracle or the such)
Now... isn't LabVIEW fun??!!!??? Can even use it to control robots! and toy robots!!
LOL! 😄
08-28-2007 09:19 AM
08-28-2007 10:47 AM
08-28-2007 12:29 PM - edited 08-28-2007 12:29 PM
Message Edited by JeanPierre on 08-28-2007 01:37 PM
LabVIEW, C'est LabVIEW
08-28-2007 12:46 PM
JPD wrote
On Figure 18 you make a recursive call by opening a VI reference in a loop. The performance will improve if you open the VI reference outside the loop and reuse the same instance in the loop, avoiding the overhead of the VI instance creation/destruction.
Well I may be confused because this is the first time I did re-cursive calls for anything other than just experimenting.
One thing that I never was clear on was if the instance of the VI opened with the re-entrant switch (8) create a new instance for every "call by reference".
So its sounds like it is the Call by reference that actually creates the unique data space.
I will have to think more about this.
Thank you,
Ben
08-28-2007 12:48 PM
LabVIEW, C'est LabVIEW
08-28-2007 01:07 PM - edited 08-28-2007 01:07 PM
@Ben wrote:
....Well I may be confused because this is the first time I did re-cursive calls for anything other than just experimenting.
One thing that I never was clear on was if the instance of the VI opened with the re-entrant switch (8) create a new instance for every "call by reference".
So its sounds like it is the Call by reference that actually creates the unique data space.
I will have to think more about this.
Thank you,
Ben
Message Edited by JeanPierre on 08-28-2007 02:09 PM
LabVIEW, C'est LabVIEW
08-28-2007 01:19 PM
THank you for the replies JPD!
So if I have a data structre like
Cluster
array of cluster
with nested cluster inside it
I would envision my call chain as
Cluster_VI >>> Array_VI >>> Cluster_VI >>> Cluster_VI
So would just openeing one instance of the "Cluster_VI" sitll work?
JPD,
THank you for pointing out the "defer FP" to stop the flicker. The uberNugget was already to large when I concidered mentioning that point.
BTW: You should not feel obligated to reply (unless you really want to ).
If someone else can clear this up I would be very happy.
Ben
08-28-2007 03:24 PM
No you have to open a new VI reference at each recursion depth.
@Ben wrote:
THank you for the replies JPD!
So if I have a data structre like
Cluster
array of cluster
with nested cluster inside it
I would envision my call chain as
Cluster_VI >>> Array_VI >>> Cluster_VI >>> Cluster_VI
So would just openeing one instance of the "Cluster_VI" sitll work?
````
LabVIEW, C'est LabVIEW
08-28-2007 03:35 PM
Thank you once again JPD.
You wrote;
And unfortunately, the last time I checked the recursion chain A_VI >> B_VI >> A_VI is not allowed, only A_VI >> A_VI >> A_VI is possible.
Well I did not know that, so I did exactly that in the example I posted (provided the data structure calls for it).
I have also tested doing A >>> B >>> A >>> B as far I was willing to test it.
I have single stepped it through those calls (in LV 8.2.1) to verify it is doing exactly that.
Warning:
Do NOT abort a VI while single stepping into recursive calls. LV will hang forever if you do. Better to get out of the calls and then abort.
Ben