Jump to content

Bug when using Get Waveform Attribute in subVI


Recommended Posts

I ran across a bug in LabVIEW 2012 the other day. This does not exist in LV 2011 or prior. The CAR is 416470 if you want to track it.

 

The bug occurs when a subVI has a Get Waveform Attribute with the default value terminal wired to a control. What appears to happen is the Get reads the value which can be seen on an indicator connected to the value connection of the Get Waveform Attribute primitive, however the calling VI gets a default value (in my case an empty string) instead of the value at the subVI's indicator.

 

The workaround is the either use a constant for the default value, or put a Always Copy primitive between the Get Waveform Attribute and the indicator.

 

What I believe technical support was trying to explain to me (as he wasn't quite sure what was explained to him, so take this game of telephone for what you will) is the memory location of the control is reused for the indicator rather than creating a new memory location. This prevents the calling VI from reading the memory location of the indicator as one was never created.

Link to comment
I ran across a bug in LabVIEW 2012 the other day. This does not exist in LV 2011 or prior. The CAR is 416470 if you want to track it.

...

The workaround is the either use a constant for the default value, or put a Always Copy primitive between the Get Waveform Attribute and the indicator.

Why does that not surprise me.  If I could make a polymorphic VI for all types, I would make a subVI that just calls the Always Copy, but have the icon of the subVI be a band-aid.

 

http://lavag.org/topic/16336-cannot-register-event-for-array-of-references-on-a-conpane-code-included/#entry99858

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
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.