EJW Posted April 15, 2008 Report Share Posted April 15, 2008 hi everyone. just wondering which of the two methods of unbundling tasks in my example code is more appropriate to use. if you could take a look and let me know i'd appreciate it. Quote Link to comment
orko Posted April 15, 2008 Report Share Posted April 15, 2008 QUOTE (EJW @ Apr 14 2008, 10:33 AM) hi everyone. just wondering which of the two methods of unbundling tasks in my example code is more appropriate to use. if you could take a look and let me know i'd appreciate it. Personal opinion: I try and keep everything inside case structures as small as possible, and with minimal changes in data. Ask these questions: How long does it take to fully comprehend what is going on in the top case structure? Now how long does it take for the bottom? Also, what is the possibility of miswires in the top structure as opposed to the bottom? Like noticing that say, the "DOT BOT ACCEPT" and "DOT BOT FAULT" might be swapped? Quote Link to comment
EJW Posted April 15, 2008 Author Report Share Posted April 15, 2008 QUOTE (orko @ Apr 14 2008, 02:29 PM) Personal opinion: I try and keep everything inside case structures as small as possible,... So your saying you prefer the top method, #1 ? Quote Link to comment
orko Posted April 15, 2008 Report Share Posted April 15, 2008 QUOTE (EJW @ Apr 14 2008, 11:42 AM) So your saying you prefer the top method, #1 ? I would prefer method #3 Which is method #1, with a modified cluster that had names of "DO COMPLETE", "DO ACCEPT", and "DO FAULT" (without the "top/bottom"). Then you can use a typedef. Oh, and if you need to have the program know which of the two was selected, you could have the "race" enum included in this cluster: http://lavag.org/old_files/post-3266-1208200731.zip'>Download File:post-3266-1208200731.zip Quote Link to comment
Mark Balla Posted April 16, 2008 Report Share Posted April 16, 2008 QUOTE (EJW @ Apr 14 2008, 12:33 PM) hi everyone. just wondering which of the two methods of unbundling tasks in my example code is more appropriate to use. if you could take a look and let me know i'd appreciate it. I vote for Method #1 If you really only have 2 items in you Enum you could also use the select primitive. Also your Enum tells you already what method you are going to choose so you don't need to run the other subvi. Quote Link to comment
orko Posted April 16, 2008 Report Share Posted April 16, 2008 The only reason I voted for method #3 is that I liked Method #1 as well... but didn't like the way that one of the clusters was being coerced ("DO TOP"/"DO BOT"). Notice that whatever cluster you wire into the case first is the one chosen as the data type that the second one is coerced to. 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.