alecjcook Posted January 17, 2017 Report Share Posted January 17, 2017 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 Quote Link to comment
drjdpowell Posted January 17, 2017 Report Share Posted January 17, 2017 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. 2 Quote Link to comment
ShaunR Posted January 17, 2017 Report Share Posted January 17, 2017 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. . Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.