Jump to content

Data Value Reference Problem


Recommended Posts

Hi. Please see the below examples. Neither Ex 1 or Ex 2 increace the number in Output in "Output" or "Numeric 2" as I expect.
Could someone explain to me why this is please. I was under the beleif that a DVR refered to the memory in which the data is held, so surely the examples I have given should work??
http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/external_data_val_ref/

Many thanks, Alec

DVR Problem.png

Link to comment

The “Create DVR” creates a special memory place, that is not the same as your “Numeric” cluster element or Control.  You are setting that new memory to be equal to your “Numeric” on creation, but they are not thereafter connected.  Those orange wires are by-value.  To get the value inside the DVR, either use the IPE structure or it is provided as an output to the DVR destruction primitive.

  • Like 2
Link to comment

The DVR is a container that enables you to access data via a refnum (so you can pass around the reference rather than make copies of the data). It is not a pointer but has some analogies. You will notice that there is a "data value" output of the delete primitive which returns the contained data when the container is destroyed and, if you inspect this data, you will find the incremented value.

.Untitled.png

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.