From: Michael Ashe [mashe@ctio.noao.edu] Sent: Friday, May 17, 2002 09:10 AM To: Info-LabVIEW Subject: Re: "Advice from the Gurus, please..." Hi Pat, & all... It seems that most of the responses skipped your question and jump directly into telling you (Pat) what to do and how to do it. But you asked for our stories, how we did it, so here goes mine (Readers Digest condensed version..., well, maybe 'abridged version' is more accurate... okay, okay, short novel, so here's your warning to skip to the next post...). I trust you can filter what you find useful and delete the rest... I was working at General Dynamics, Electric Boat shipyard, in weapons control systems and associated test systems. This was 1990 or 91 or so (92?). We finished one articularly difficult, hardware based (popsickle-sticks, chewing gum and "EB Green" duct tape) 19 inch rack test system (the Tactical Weapon Simulator Test Set, TWSTS, pronounced "twists", after what it did to our emotional stability and peace of mind...), and I swore that I would quit and find a new job before I would get saddled with another hardware based test system. Enter the US Navy's Seawolf submarine program. My group got assigned to work on the weapons stowage and handling system, my peice was a test system for it. The Seawolf Weapons Electronics Test Set, "SWETS" assignment caused us/me to break out into cold "swets" because we had roughly five times as many analog/digital/serial channels to handle as did TWSTS, but only about half the budget and less time. (900+ mixed channels...) Gosh, it felt so uplifting to know that management had such confidence in our ability to deliver a 10X improvement, "utilizing stone knives and bearskins", (to borrow a quote from Mr. Spock) by lunchtime next Thursday... We looked at programming this in MS "C" or VB, possibly, to try to get some productivity gains and a GUI based system. Enter NI, who had recently ported LabVIEW to version 2.5.2 on Windows 3.1, and our Connecticut/New England NI rep, Kevin Blackwell, who came to our lab and gave me a demo. It lasted about two hours, but I was, in your words Pat, "entranced" in about two minutes. It was instantly obvious to me that this was simply a better way to program, a MUCH better way. Add all this up, and I was *highly* motivated to learn LabVIEW. It was: a. fun, way-cool software b. a way to get my 5-10x improvement, and therefore my project done c. fun, way-cool software, d. something that was going to WIN in test & measurement, which meant early expertise in it would be *highly* marketable... e. did I mention that it was/is fun? For SWETS we needed to get a XyCom embedded PC on the VME bus to run lots of VMIC cards. Unfortunately the XyCom used a DLL to talk to the VME bus and there were no LabVIEW drivers for such things at that time. So that meant writing CINs (code interface nodes), lots of them, at least 70 to 75, if I remember correctly. Kevin tried to discourage this, (in favor of VXI) saying it would take more work than the rest of the project. But for various reasons we stuck with VME. Well, I like a challenge and can be fairly stubborn (some would say stupid, but thats another story...). I had two remaining problems: we didn't have LabVIEW, and I didn't yet have expertise... details... The senior engineer on the project, Al Drozdal ("Dr. Oz", and a good friend) and I waited for 3 1/2 days for just the right moment to put in the purchase requisition for LabVIEW, since our manager believed that LabVIEW was a toy and that test engineering staff should be exstatic about having four function calculators and #2 pencils... (Our dept. had recently upgraded from Papyrus 2.2.6) Finally our customers, the NAVSEA reps, were just sitting down in the office for a meeting that everyone was late for and Al and I rushed in with a whole stack of requisitions with the LabVIEW one tucked in about 2/3 of the way down the stack. Our boss started signing furiously, then experienced instant myocardial infarction at $2k for LabVIEW, whereupon one of the NAVSEA reps, bless his little heart, interrupted and said, "For pete's sake Pete, would you just SIGN the stupid thing so we can get on with the meeting!!?" Pete scowled at me, (I was only a journeyman level techno-weanie type at the time), looked at Al, (Al was a departmental senior guru-wizard techno-weanie type with lots of respectibility and "pull"), Al smiled and flashed Pete the thumbs up, Pete signed, and we hustled out of the office beaming like two high-school guys who'd just been assured dates with the local college prom queens. Rather than trust the normal purchasing cycle (none of you out there have ever had glitches with purchasing have you?) we hand carried the LabVIEW P.O. all the way up the signature ladder, including the senior V.P. (This, over the screaming protests of the purchasing dept. union types) and miraculously, a few days later, the stork arrived and Electric Boat had its very first little baby LabVIEW license in house. One problem down, one to go. I figured, if I was highly motivated, and if my company could spend $2K, so could I. Actually, it was closer to $2800.00 for a Gateway2000 386-25 tower with a whopping 4 megs of RAM (which I upgraded to 8 so I could run LabVIEW) and a 40 Meg HD, which I upped to 80 Meg so I'd be assured of "extra room", yup, one fine, hot peice of iron in its day. Being tragically single at the time, (the wonderful wife, two kids, mini-van, etc, didn't show up til a few years later; guess I shoulda hand walked those POs too...) I divided my after workhours life between jogging, tennis, cooking (which shares many characteristics with programming, good and bad, but that is another novel), and learning/playing with LabVIEW til the wee hours of the morning, every morning for three+ months, by which time I was well on my way to that "guru" status you asked about, and lecturing at LabVIEW users groups on writing CINs and integrating windows Help files into LabVIEW, an arcane and black-art practice in 1992. So my LabVIEW career started in CIN and went on til I was beyond HELP. (Sorry, couldn't resist that one) I would have made progress much faster if I hadn't had to reboot so often, which, with the conjunction of LabVIEW and Windows both in the constellation "3.x" was about every half hour, on a good day. This was before UNDO, before even semi-stability, etc (yes, I see the gleams off the rest of you wearing purple hearts from that era...) After the SWETS project got well underway I jumped ship (abandoned?) to another company and dept where most of my new coworkers programmed in LabVIEW. It was great not having to convince a boss or coworkers that LabVIEW was the way to go, now we just had to convince potential customers. I learned a lot from being around other LabVIEW programmers, sharing our experiences, programming style, tips tricks, legacy libraries, etc. One of the things I learned early on (actually back at EB) was to have a little humility (just a dash, not to much now) and avoid the "Not Invented Here" (NIH) syndrome. Recall those 70-75 CINs? (Gee, does anyone remember Watcom?) After I wrote the first two dozen or so Kevin B. suggested over lunch that I should write a generalized CIN to interface to DLLs. Great idea! We figured it would even be marketable. So I started on that in my spare time, reading up on using assembly code in Watcom and stack manipulations. (to do a generalized, growable CIN like this you can't use the normal parameter passing, you have to push parameters on the stack, therefore => assembly). A few days later Kevin sends me a fax that Stu McFarlane (sp?) of ViewPoint was beta testing "DownShift", which did what I was working on. I had a choice, adopt a NIH attitude and forge on with my pet project (and 50 more CINs), or call Stu. I called. Over lunch a couple days later Stu handed me DownShift beta copy #4. A short beta test later I abandoned my project and have made it a general guideline since: don't build/code what you can barter or buy for less, if its well written (DownShift was, and IMHO is still better than the Call Library Node, I wish Stu would port it to 32 bits... DownShift handled complex datatypes, clusters, etc, easily, flawlessly). I got another surge of motivation later and became the first person in New England to get certified to teach LabVIEW courses. One of the best ways to learn any subject is to have to teach it to someone else. Somewhere along the line I started reading the newsletter you are now reading. It helped too, lots. Eventually I started giving lots of answers and advice to people on the list. Somewhere along the line that practice slowed down for me, but there is always someone (usually many someones) on this list willing to take the time to help with any question. I still ask. Lets see, "secrets", "secrets""... Well, in my experience, there are few/none. But if there is anything close to a secret, then from your post below I suspect that you already have at least the seed of it. You say you "just LOVE LabVIEW". Strong motivation/enthusiasm is probably the closest thing to a secret there is in my experience, and I mean the desire to become really good, excellent, not just good enough to scrape by on the current project. If you want a black belt in "G" it takes practice. (If, by chance, you find the magic miracle shortcut, please put me on your mailing list) What else has helped? I early on got fairly familiar with the \LabVIEW\Examples directory and the Info-Labview VI archives, and later every new source of code and technique that showed up. There is a ton of stuff available now with the click of a mouse that wasn't 10-12 years ago. Several people have already posted nicely compiled "to-study" lists. (special recognition to Paul Brown for his post yesterday) I read Gary's book(s), and most of the others that came out. The mileage varied, but I always bought/buy sooner or later. I went to LabVIEW Users groups, listening intently to try to learn something new. I presented, often, at those same groups. Same for attending NI week the first few years. I subscribed to the LabVIEW Technical Resource newsletter. All of these are not "secrets", but manifestations of the attitude/commitment/desire to learn. I have always had a bit of an attitude when I hear that something's "impossible". To quote Robert Heinlein, (Lazarus Long) "Always listen to the experts, they'll tell you what can't be done, and why. Then go do it..." Another good Heinlein: "To stay young requires unceasing cultivation of the ability to unlearn old falsehoods." Paraphrased and applied to software & programming: I have adopted and then discarded several methods/techniques over the years, in favor of better ones. Take state-machines for example. Can't live without them now in LabVIEW. There are roughly half a dozen increasingly complex, flexible architectures for state machines. Technique has developed over the years, mostly based on "case structure inside while loop" constructs, ie, Finite State Machines, (FSMs). But, if you're willing to take the mental leap of discarding that common construct, there is a way (actually probably several) to create Psuedo Infinite State Machines using VI Server. Pat, Thanks for the excuse for a stroll down memory lane. Your post has generated more replies in two days than I have seen in a long time. LabVIEWs "been berri berri good to me". Well, enough typing, its time to get back to wiring... Ciáo, Mike **************************************************************** Michael C. Ashe Email: mashe@ctio.noao.edu Sr. Scientific Programmer/LabVIEW, SOAR Telescope Project SOAR Casilla 603 P.O. Box 26732 La Serena 950 N. Cherry Avenue Chile Tucson, AZ 85726-6732 Phone: +56-51-205341 +56-51-205200 Fax: +56-51-205368 +56-51-205212 **************************************************************** -------------------------- Original Message --------------------------- Subject: Advice from the Gurus, please... From: "Patrick V. Reavis" Date: Tue, 14 May 2002 12:11:15 -0500 (CDT) Hello all, So how did all you guys and gals learn LabVIEW? I've become entranced with the efficiency of this stuff, but other than paying $2000 for a week's worth of class from an NI alliance member, I don't see how I'm gonna learn the in's and out's except by doing (I'm not a programmer by trade, but I just LOVE LabVIEW!). I have 5 or 6 good books on the subject, yet I still seem to come up with questions to which I can find no answer. So what's the secret to your genius? Wirehead wanna-be, Patrick V. Reavis