01-23-2009 09:09 AM
Nice!! I never knew that about the enumeration type... I have always wished there was a way to have the name of the selected function appear at the top of the case statement.
I am going to check out your Action Engine Nugget Ben.
Thanks guys
01-23-2009 09:58 AM
I don't know the details of how the memory re-use will work each time you call your function with a new 1-D array. If LabVIEW can't re-use the existing 1-D array then it will deallocate it, so you're not losing memory. If the number of elements is smaller the second time then there's a good chance the buffer can be reused. Since you'll be calling this function multiple times I'd be surprised if you'll see any benefit to requesting deallocation - you'll just reallocate on each call - and your code may run slower.
The other replies cover the advantages of using an enumeration - just be sure you make it a type definition so it will be consistent everywhere when you make changes. The only time I regularly use rings is on the front panel when I need to update the list of items programmatically. In most other situations an enumeration is better.
01-28-2009 06:16 AM
01-28-2009 06:57 PM
For performance issues I really wouldn't care about that. By name would mean to find the reference in a hash table, if the compilere can't resolve it during compilation time.
I would say, it is a matter of personal preferences. If you are wire-dogmatic, you only go by wire. If you really miss that text based #DEF, you would always go for the nostalgic name. It is personal falavour... No, no, no, don't tell me that you need a performance increase in a lousy one time called vi...
Felix
01-29-2009 04:37 AM
I knew there wouldn't be much in it, thanks Felix. I think I will stick with wires anyway, I find it aids visual dataflow.
However, we are all engineers here, and as such crave efficiency ^_^
01-29-2009 08:06 AM
02-17-2009 09:18 AM
@nathand wrote:
The other replies cover the advantages of using an enumeration - just be sure you make it a type definition so it will be consistent everywhere when you make changes. The only time I regularly use rings is on the front panel when I need to update the list of items programmatically. In most other situations an enumeration is better.
Thanks so much for the info on the enumeration and type defs. I have never used either before. Using type defs greatly reduces the amount of work needed to make changes to the code!! I started using the type defs just for the enumeration controls for the AE's but am using type defs for so many other things now, thanks for the help!
I have an U8 variable that I made a type definition out of. I am making this variable a type definition because the size of it may need to be incresed to say U16 in the future. Is there a best way to convert LV integers to my type definition U8 variable. For example, I have a for loop that is iterating through an array, and if I know that the array size is not going to be greater than 256, what is the best way to convert the I32 iteration count to my type definition U8 variable? I tried using the type cast function but it does'nt work because it takes the higher bits of the I32 integer not the lower bits. Any help is greatly appreciated.
Also, on another note..... I am looking to buy a comprehensive and useful LabVIEW book that covers the majority of advandved LabVIEW programming techniques such as Action Engines, Optimizing Performance of VIs, Memory Management, etc.... Is there a "Best Book" out there, or maybe a list of some of the best?
Thanks for your help
-Anthony
02-17-2009 09:30 AM
amaglio wrote:...
Also, on another note..... I am looking to buy a comprehensive and useful LabVIEW book that covers the majority of advandved LabVIEW programming techniques such as Action Engines, Optimizing Performance of VIs, Memory Management, etc.... Is there a "Best Book" out there, or maybe a list of some of the best?
Thanks for your help
-Anthony
While waiting for book suggestions you may want to explore the Tags for these topics.
And don't just stop with those links. Make sure you explore the "related tags" (View all) to see related topics. I have worked up the start of a "tree of LabVIEW knowledge" if you chase down all of the branhes.
Just trying to help,
Ben
02-17-2009 09:35 AM
02-17-2009 10:05 AM
amaglio wrote:Thanks Ben, I will check these tags out, thanks for helping me find my way around all of the knowledge here on this board. By the way I checked out your Action Engine Nugget... The information there was very useful. Thanks again for you help
-Anthony
Thank you very much for the kind words Anthony! If you have a chance to punch a couple of "Kudos" buttons as you go, I would very greatful.
Ben