jcarmody Posted October 7, 2011 Report Share Posted October 7, 2011 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. Quote Link to comment
Rolf Kalbermatter Posted October 7, 2011 Report Share Posted October 7, 2011 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 :-) ) Quote Link to comment
jcarmody Posted October 7, 2011 Author Report Share Posted October 7, 2011 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? I intend to use this when troubleshooting VIs based on the JKI State Machine, so I know the wire's source. Thanks. Quote Link to comment
Aristos Queue Posted October 7, 2011 Report Share Posted October 7, 2011 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). 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.