Pollux Posted December 5, 2008 Report Share Posted December 5, 2008 I have coded a prototype user interface which uses lots of locals and flat sequences. For increased efficiency I want to avoid all that. I think sequences can be avoided by rethinking the algorithm and writing some subvis that would have error clusters wired in the proper order to force the data flow. But I have no idea how can I avoid locals when I need to do increments on variables. If you have any suggestions feel free to write here. :worship: Here is a sample of my code. Thank you Quote Link to comment
jcarmody Posted December 5, 2008 Report Share Posted December 5, 2008 QUOTE (Pollux @ Dec 4 2008, 04:25 AM) I have coded a prototype user interface which uses lots of locals and flat sequences.For increased efficiency I want to avoid all that. You could bundle all of your controls and carry them around in a shift register to get rid of the local variables. Adding error in/out terminals to your subVIs will let you enforce data flow without flat sequences. you can replace the select statements that return a 1 or 0 with a Boolean To (0,1) use another state to sync the front panel indicators to the data cluster when necessary http://lavag.org/old_files/monthly_12_2008/post-7534-1228391339.png' target="_blank"> Quote Link to comment
Mark Smith Posted December 5, 2008 Report Share Posted December 5, 2008 I second jcarmody - these are all good suggestions. This UI scheme that I frequently use demonstrates in more detail how the keep the current UI state up to date without locals or polling by using events and bundling or unbundling into a cluster. Mark Download File:post-1322-1228401271.zip Quote Link to comment
crossrulz Posted December 5, 2008 Report Share Posted December 5, 2008 The LV Intermediate I course has a really good example of this using Queues. 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.