i2dx Posted September 16, 2006 Report Share Posted September 16, 2006 For possibly the same reason that I sometimes get the *evil* idea to implement if (username="xyz") { integer wires are orange; double wires are blue; } We all have temptations that we have to supress. hmm ... somtimes the best ideas grow from such "evil" ideas changing integer and double wire colour will not hurt so much. Most LV developers I know do not care about coercion dots [maybe you should make them 10x bigger with maximum contrast ? ] But changing the meaning of the stop condition in a while loop - THAT will cause much impact , and to top that: change it each time you restart LV :ninja: Quote Link to comment
Louis Manfredi Posted September 19, 2006 Report Share Posted September 19, 2006 Most LV developers I know do not care about coercion dots [maybe you should make them 10x bigger with maximum contrast ? --You can change the color of the dots. I set mine to red. Sometimes I don't care much about coercion, but sometimes its really important, and its always good to know. Louis Quote Link to comment
crelf Posted September 19, 2006 Report Share Posted September 19, 2006 Sometimes I don't care much about coercion, but sometimes its really important... Whilst coercion may not always be important, knowing about cercion is always important! Quote Link to comment
LAVA 1.0 Content Posted September 19, 2006 Report Share Posted September 19, 2006 I think functional globals is a very poor term, because functional in context of programming languages refers to functional programming. If we will call these globals functional, it will cause problems in the future as functional programming will probably be adopted to main stream programming languages. Quote Link to comment
crelf Posted September 19, 2006 Report Share Posted September 19, 2006 I think functional globals is a very poor term, because functional in context of programming languages refers to functional programming. I agree, although a functional global is different to a LV2-style global in that it traditionally doesn't just hold data, but also can perform some sort of encapsulated function on it as well. Quote Link to comment
LAVA 1.0 Content Posted September 19, 2006 Report Share Posted September 19, 2006 I agree, although a functional global is different to a LV2-style global in that it traditionally doesn't just hold data, but also can perform some sort of encapsulated function on it as well. Action Engine, Action Engine, Action Engine ... Whoo Whoooo! (Read "I Think I Can, I Think I Can, I Think I Can,") Quote Link to comment
crelf Posted September 19, 2006 Report Share Posted September 19, 2006 That's hillarious! It's like the last time I came across the Canada->US border - the immigration guy asked me what my profession was and I replied that I was an engineer - he asked what type of trains I drove... Quote Link to comment
Darren Posted September 19, 2006 Report Share Posted September 19, 2006 One time when I was teaching a LabVIEW class in California, I had to go to a ghetto car rental place (the only place open on Sunday that would rent a car to a 23 year old). I gave the guy my corporate credit card and he said, "National Instruments...what are you, some kind of musician?" -D Quote Link to comment
crelf Posted September 19, 2006 Report Share Posted September 19, 2006 "National Instruments...what are you, some kind of musician?" Quote Link to comment
LAVA 1.0 Content Posted September 20, 2006 Report Share Posted September 20, 2006 I gave the guy my corporate credit card and he said, "National Instruments...what are you, some kind of musician?" Next time say, "Yeah... Sweeeeet! it's my DAD's card... I'm with the Spazmatics" Quote Link to comment
torekp Posted October 3, 2006 Report Share Posted October 3, 2006 BTW - does anybody use such one USR (or LV2) global VI for several global variables, by using a variant as the shift-registered data, and with commands like "GetValue" and "SetValue", where the name of the appropriate global parameter is used as a variant attribute name, and the data is the variant attribute variant itself? I've found this to be quite powerful, and then only need one (or a handful) of globals for a large hierarchy of VI's. This sounds like a great idea, care to explain more - by attaching a simple example? :worship: in advance. Quote Link to comment
Donald Posted October 4, 2006 Report Share Posted October 4, 2006 In Belgium and the Netherlands we (CIT Engineering) most often use the acronym GLI - Intelligent (designed) Global Variable. I believe that the acronym originates from Philips Natlab R&D center in Eindhoven (NL) and was introduced by the LabVIEW support group of Albert Geven. I like the acronym because it is short and easy to understand, also for non-hardcore (= occasional) developers and students. Everybody understands that an intelligent global has to offer something extra over a standard global variable. I wonder where 'functional' in Functional Global stands for. Does it refer to functional programming? Which is strange because functional programming tries to avoid mutal objects. Does anybody knows this? Wikipedia learns me: Functional programming is a programming paradigm that conceives computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming emphasizes the application of functions, in contrast with imperative programming, which emphasizes changes in state and the execution of sequential commands. Sources: http://en.wikipedia.org/wiki/Functional_programming http://en.wikipedia.org/wiki/Immutable_object Quote Link to comment
crelf Posted October 4, 2006 Report Share Posted October 4, 2006 I wonder where 'functional' in Functional Global stands for. Does it refer to functional programming? Which is strange because functional programming tries to avoid mutal objects. Does anybody knows this? "Functional" doesn't come from functional programming, but the fact that it's not just a global - it has some other sort of functionality inside. I'm not sure I'd use "intelligent" either, as the code and/or functionalty isn't necessarily intelligent... It's a quanry Quote Link to comment
Donald Posted October 4, 2006 Report Share Posted October 4, 2006 Good to hear that 'functonal' doesn't come from Functional programming which was not obvious for me. Crelf I expected your comment about intelligent design and you are right but I also guess that the fact the programmer of the good/bad code used LabVIEW is also a sign of intelligence :-) ? I definitely do NOT like USR since this limits this style of globals to shift register based patterns: 1) For a non-LabVIEW person this is impossible to understand, most of my managers (that pay the projects) do understand intelligent or functional global but have no idea what a shift register is. 2) And what about queue based patterns?? The queue based designs are very hard to beat (by LabVIEW onluyy code) when you need to store/access a large amount (more than 10^6 samples) of data for an unknown number of objects at runtime? Do you want more details on queue based globals please check NI application note about handling large data objects in labview. The biggest problem with the queue based design is that the queues become invalid after the creating VI stops running... so harder to debug programs. (as far as i know there is no labview.ini setting for this behavior). I've never seen any LabVIEW programmer/application using this design so please share your experiences with this design pattern. Maybe we need a new thread for this one? I believe the variant design is not applicable for very large data sets or NI should have done miracles in LV8.20 regarding variant performance sets but could be usefull to have a clean OO approach. I guess it is even harder to debug when things go wrong. Quote Link to comment
LAVA 1.0 Content Posted October 4, 2006 Report Share Posted October 4, 2006 The biggest problem with the queue based design is that the queues become invalid after the creating VI stops running... so harder to debug programs. (as far as i know there is no labview.ini setting for this behavior). This is not completely true. Queues do become invalid after all the VIs that reference a specific queue stop running, or a the Destroy option is used when releasing the queue. There have been numerous discussions on Info-LabVIEW regarding the creation and persistance of LabVIEW queues, and recently as outlined in these two messages: http://sthmac.magnet.fsu.edu/infolabview/I...3/10/14/24.html http://sthmac.magnet.fsu.edu/infolabview/I...-08-05_005.html Use the Advanced Search of Info-LabVIEW Archive located HERE, and search on queue for the year 2006. There's LOTS of info on this subject Quote Link to comment
Yair Posted October 4, 2006 Report Share Posted October 4, 2006 I definitely do NOT like USR since this limits this style of globals to shift register based patterns: ...And what about queue based patterns?? Or even a local which can also retain its value between runs? OK, OK. Stop throwing those tomatoes! I know that locals are evil, memory-gobbling, cause-of-all-the-world's-troubles devices. Just bringing up the point, because there are cases where they're an interesting method for this. Quote Link to comment
Donald Posted October 5, 2006 Report Share Posted October 5, 2006 I can confirm that one of the answers on the NI LabVIEW certification exam is "Functional Global"... Lv Punk thx also for the shortcut to the mails of Stephen Mercer. Very good explanation why they changed the Obtain Queue primitive. 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.