Jump to content

value of data on a wire


jcarmody

Recommended Posts

How can I get the value of the data on a wire from a reference to the wire itself?

I'd like to make a plugin that will monitor a wire feeding a Case structure's case selector and automatically navigate to the case being executed. It'll make debugging easier where Execution Highlighting is too painfully slow to watch.

Link to comment

How can I get the value of the data on a wire from a reference to the wire itself?

I'd like to make a plugin that will monitor a wire feeding a Case structure's case selector and automatically navigate to the case being executed. It'll make debugging easier where Execution Highlighting is too painfully slow to watch.

I don't think a wire stores any data in LabVIEW. However you may want to look into custom probes. They basically do what you want, though you have to place them manually (well maybe scripting supports them too :-) )

Link to comment

I can follow the wire to its source and get the value of the indicator it's wired to, but only because I happen to know the label text. I'll keep playing to see if I can identify the control by the wire's terminal. Any thoughts?

post-7534-0-95278500-1318010769_thumb.pn

I intend to use this when troubleshooting VIs based on the JKI State Machine, so I know the wire's source.

Thanks.

Link to comment

There's no way in scripting to get a runtime value from a wire or a raw terminal because they don't have values -- they all share values through the inplaceness algorithm and the memory address that is used for any given terminal/wire is not unique to that term/wire. You can ask a control or indicator for its value, although opening that control reference will have a performance impact on your code since now a copy of the value will be made to the UI layer when your VI runs (just as if you had the front panel sitting open).

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.