LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using Data Value Reference in Action Engine

Solved!
Go to solution

I thought I could easily create a data value reference in an action engine.  I've attached what I built.  However, while 'init' doesn't cause an error, 'read' and 'write' and 'close' results in error 1556 "the reference is invalid. This error might occur because the reference has been deleted." 

Does shift registers not handle references?

0 Kudos
Message 1 of 3
(967 Views)
Solution
Accepted by topic author mysticfree

How are you calling this subVI?

 

You don't have any of the terminals wired to the connector panel.

 

Are you running this from its own front panel?  If so, when the VI goes dead, you'll lose the DVR you just created from the Init case.

 

My understanding is that it is also a best practice to put the terminals of that subVI onto the top level of the block diagram.

 

I don't understand your reasoning for putting a DVR in an action engine.  The action engine wraps up the storage of data for you.  The DVR is a method of storing data in a single location for you.  It's like you are putting a box of data inside of another box.  The DVR serves no purpose in this case since  you have no means of using the reference wire anywhere else in your application.

0 Kudos
Message 2 of 3
(947 Views)

I was testing out the idea of using a DVR to manipulate large data reads from an analog channel, instead of storing the data in FGV. 

 

I was working with the mindset of building and testing subVIs and overlooked memory references being destroyed upon the run end of a VI.  Thank you for pointing that out.

 

And so, when I placed the DVR VI in another while loop, it operated as expected.

0 Kudos
Message 3 of 3
(919 Views)