LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
wiebe@CARYA

Persistent DVR 's

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

I'll keep the idea as broad as possible. The solution can go a few ways, and I don't want the idea to be turned down, because the solutions.

 

In general, DVR's have two related issues.

 

 

1) DVR's are only usable when initialised.

 

This makes them more difficult to use for, for instance, interlocking. Instead of using a IPE structure, we have to:

 

(make a sub vi)

check the ref

if not a ref create a ref

enter the IPE structure

 

2) DVR data is not persistent.

 

So a singleton class implemented with a DVR will lose it's data the moment all code is stopped. Debugging a sub VI that uses the class is impossible, because the data is gone. This makes DVR classes much less attractive.

 

I know how to solve these issues, but I think LV could make this easier.

 

So the rather broad idea:

 

Somehow allow DVR's to be sometimes memory persistent.

 

 

4 Comments
wiebe@CARYA
Knight of NI

So one idea might be to have a function to switch on\off DVR persistence.

 

Persitent DVR VI.jpg

And obviously one to query persistence.

 

I know there would be tremendous downsides to this. Memory leaks, but also the impossibility to get back the memory. It's just an obvious suggestion with obvious problems.

 

 

 

wiebe@CARYA
Knight of NI

Another (better?) solution would be to have "static DVR" constants and controls.

 

Static DVR constant.jpg

So tagging "static" would do two things:

 

a) Each time the constant\control is called, it will return the same reference.

b) The data will not disappear when all instances are stopped.

 

Conseptually "static" will add 1 to it's reference count, the value will be anything not 0, and not change (like any constant).

 

As a consequence, this will be useless for anything else then singletons or global interlocking. For that it would work very well.

 

 

 

wiebe@CARYA
Knight of NI

Please burn these ideas down as much as you like. I'm just thinking (more like brainstorming without thinking to much) out loud. This might not fit the definition "idea" very well, but I'm hoping to get some discussion going. Hopefully it leads to a good solution.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.