<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4273799050747704870</atom:id><lastBuildDate>Mon, 06 Oct 2008 14:00:00 +0000</lastBuildDate><title>Open Measurements</title><description>Thoughts on LabVIEW Data Acquisition and Instrument Control</description><link>http://openmeas.blogspot.com/</link><managingEditor>noreply@blogger.com (Brian Powell)</managingEditor><generator>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/OpenMeasurements" type="application/rss+xml" /><feedburner:emailServiceId>464225</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-6632925642286770081</guid><pubDate>Mon, 06 Oct 2008 14:00:00 +0000</pubDate><atom:updated>2008-10-06T09:00:00.981-05:00</atom:updated><title>Giving Back To Our Communities</title><description>On Friday night, I went to the opening night performance of a local non-profit choral group, &lt;a href="http://conspirare.org/"&gt;Conspirare&lt;/a&gt;.  They are an amazing, world-class group, and they put on an wonderful show that will soon be recorded by PBS.  I even recognized in the audience Dr. Anton Armstrong, conductor of the renowned &lt;a href="http://www.stolaf.edu/music/stolaf_choir/"&gt;St. Olaf Choir&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sitting in the audience, watching and listening to Conspirare, I could not help but think that this is an organization worth supporting.  How fortunate we are to have them in Austin.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Today marks the beginning of our three-week employee fall giving campaign, of which I am the chair.&lt;br /&gt;&lt;br /&gt;A few weeks ago, I received a mysterious meeting invitation in my inbox...  "Quick chat with community relations".  I had been warned that I was on the list of candidates to chair this year's campaign, so I knew what the meeting was going to be about.  This gave me time to think about it.&lt;br /&gt;&lt;br /&gt;At first, it was a "why me?" kind of experience.  What was I signing up for?  It's overwhelming and intimidating&amp;mdash;we've got thousands of employees in the US, and  I would be the voice of the campaign.&lt;br /&gt;&lt;br /&gt;We've got a pretty good track record of employee giving.  High standards, yet the economy is tough this year.&lt;br /&gt;&lt;br /&gt;Sigh.  I'm not sure I'm the guy for the job.  It would be so easy to say no; to push this off on someone else.&lt;br /&gt;&lt;br /&gt;But I don't.  I won't.&lt;br /&gt;&lt;br /&gt;I care about the community in which I live.  I care about NI, and feel privileged to work here.  I care about the arts.  I care about education.  I care about animals and the environment.  I care about social needs, health needs, literacy needs.&lt;br /&gt;&lt;br /&gt;With the consummate support of the &lt;a href="http://www.ni.com/company/citizenship.htm"&gt;National Instruments Community Relations team&lt;/a&gt;, especially Yvette Ruiz and Amanda Webster, here I am.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;hr /&gt;&lt;br /&gt;We hire a lot of our employees right out of school.  This is great; keeps us young.  It also means that some of our employees may not yet feel strong connections to their communities.  And this is one of my challenges.&lt;br /&gt;&lt;br /&gt;I asked for a field trip.  I asked our community relations people if we could organize a field trip for our campaign volunteers.&lt;br /&gt;&lt;br /&gt;I wanted our volunteers to see a need firsthand.  We have dozens of volunteers, without whom we couldn't run this giving campaign.  They go to every group meeting and explain the reasons for the campaign, the goals, and the mechanics.&lt;br /&gt;&lt;br /&gt;I wanted our volunteers to see where the money goes, and what it buys, and to be able to talk about it to our employees.&lt;br /&gt;&lt;br /&gt;We went to &lt;a href="http://www.safeplace.org/"&gt;SafePlace&lt;/a&gt;, which fights domestic and sexual abuse.&lt;br /&gt;&lt;br /&gt;A few days later, a different group of NI employees went to &lt;a href="http://www.childrensaustin.org/"&gt;Dell Children's Medical Center of Central Texas&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And in the past few weeks, I've been to events for &lt;a href="http://www.cisaustin.org/"&gt;Communities in Schools&lt;/a&gt;, and the &lt;a href="http://austinlyricopera.org/"&gt;Austin Lyric Opera&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We've got thousands of non-profits in central Texas, thousands more nationwide, and our employees can choose to whom they donate.  I want all of our employees to know that they can make a difference in their communities.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Another theme I want to stress is that &lt;em&gt;any amount helps&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;I am truly proud that NI has the largest number of employees who are able to donate $1000 or more to be a part of the &lt;a href="http://www.unitedwaycapitalarea.org/leadership_giving/young_leaders_society/"&gt;United Way Capitol Area Young Leaders Society&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But many of our employees aren't in a position to donate that much.  I want them to know that they can still make a difference, even with a small donation.&lt;br /&gt;&lt;br /&gt;Among other things going on in my life right now, I'm raising money for cancer research and survivorship through the Lance Armstrong Foundation.  I'll be doing the Livestrong Challenge bike ride at the end of October.  (Plug:  Support my ride here... &lt;a href="http://austin08.livestrong.org/bhpowell"&gt;austin08.livestrong.org/bhpowell&lt;/a&gt;.)  One of my friends came up to me the other day and handed me a dollar bill in support of my ride.  It's all he had to give.  He promised another dollar in a week.  That meant so much to me, as it also reminded me of a parable that I am sure many of you know.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;My challenge to all of you readers, wherever you are, whoever you are, is to go out and make a difference in your community.  Find your passion.  Give your time.  Give your money.  Find someone who needs your support, and support them.&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/412830283/giving-back-to-our-communities.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2008/10/giving-back-to-our-communities.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1768485579038370975</guid><pubDate>Thu, 02 Oct 2008 17:30:00 +0000</pubDate><atom:updated>2008-10-02T12:49:42.826-05:00</atom:updated><title>AutoTestCon 2008</title><description>As I mentioned in an earlier post, I was at AutoTestCon in Salt Lake City a few weeks ago.  This was my first visit to this MIL/AERO conference and tradeshow.&lt;br /&gt;&lt;br /&gt;I was greeted to the Salt Palace Convention Center by banners with images of fighter jets and bombers over Monument Valley and Delicate Arch.&lt;br /&gt;&lt;br /&gt;I was there to give a presentation on IVI, be part of a panel discussion on LXI, and to support a demo for the LXI Consortium...&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;Here's a photo of the demo I built for the consortium, using a Rohde &amp;amp; Schwarz FSL Spectrum Analyzer, a Keithley 2910 RF Signal Generator, two Agilent E5818A Trigger Boxes, an NI 8353 quad-core 1U PXI Controller, and NI LabVIEW 8.6.&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_3ziZaf8zuQ4/SOTmncDUNmI/AAAAAAAAAGs/efViFJM8CYU/s400/20080909_0007.jpg" alt="" id="BLOGGER_PHOTO_ID_5252576630640227938" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;The other demo in the booth consisted of Matlab and image processing software from The Mathworks, Agilent E5818A Trigger Boxes, and 1394 cameras from Point Grey Research.  Colloquially called "the bouncing ball demo", it used a military grade &lt;a href="http://www.hasbro.com/playskool/default.cfm?page=browse&amp;amp;product_id=13031"&gt;Playskool Busy Basics Busy Popper&lt;/a&gt; for projectile measurements.&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_3ziZaf8zuQ4/SOTmnC8iawI/AAAAAAAAAGk/3C6cKVaJSs4/s400/20080909_0002.jpg" alt="" id="BLOGGER_PHOTO_ID_5252576623900912386" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Okay, the part about "military grade" was a joke.  The demo was there to make noise and entice people into the booth.  Shown in the photo are Conrad Proft, from Agilent, and Rob Purser, from The Mathworks.&lt;br /&gt;&lt;br /&gt;Both demos showed LXI features such as IEEE 1588 timing and distributing triggers across a network.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;On Monday, I gave a presentation about IVI instrument driver technology at one of the seminars.  This was just a basic introduction into what IVI drivers are, and an update on the status of current work in the IVI Foundation.&lt;br /&gt;&lt;br /&gt;The tone was set for this presentation a few seconds into my talk.  One attendee raised his hand and said, "IVI drivers don't work."&lt;br /&gt;&lt;br /&gt;"I see it's going to be a tough crowd", I replied.&lt;br /&gt;&lt;br /&gt;In this particular case, the user had obtained several IVI-COM drivers from his instrument vendor, and all but one failed to communicate correctly with his instruments.  He had also received an IVI-C driver for an instrument from a different vendor, and he was unable to make it work until he got National Instruments involved to fix it for him.&lt;br /&gt;&lt;br /&gt;This is a good point for me to point out that you don't have to depend on your instrument vendor for your instrument drivers.  The National Instruments &lt;a href="http://ni.com/idnet"&gt;Instrument Driver Network&lt;/a&gt; (IDNet) contains instrument drivers for thousands of instruments from hundreds of different vendors, including IVI drivers, LabVIEW Plug and Play drivers, and VXIplug&amp;amp;play drivers.&lt;br /&gt;&lt;br /&gt;Many of the drivers on IDNet are marked as "NI Certified", which means...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Certified instrument drivers comply with instrument driver standards including programming style, error handling, documentation, and functional testing. Certified drivers ensure consistency among instrument drivers and, therefore, improve ease of use. They also provide source code so that you can modify, customize, optimize, debug, and add functionality to the instrument driver. All National Instruments certified instrument drivers receive NI support.&lt;/blockquote&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;I was also on a panel discussion about LXI.  We presented to about fifteen people.&lt;br /&gt;&lt;br /&gt;A week later, we recorded a webcast for &lt;a href="http://www.tmworld.com/"&gt;T&amp;amp;M World Magazine&lt;/a&gt; with the same material.  You can view a replay of the webcast by registering on the T&amp;amp;M World website.&lt;br /&gt;&lt;br /&gt;We had time for questions and answers during both versions of the presentation.  Additional questions from the webcast will eventually be posted with answers on the LXI website.&lt;br /&gt;&lt;br /&gt;Interestingly, most of the questions at AutoTestCon related to GPIB.  Conrad Proft, from Agilent, had slides that showed examples where LXI works better than GPIB (over long distances) and RS-485 (cabling).&lt;br /&gt;&lt;br /&gt;One question was whether companies are going to continue to support GPIB.  Conrad from Agilent voiced his company's continued commitment to GPIB.  I added that I believe that many people are still building GPIB-based test systems, and that NI will continue to support our GPIB users.  (Later that week, NI announced our new PCI Express GPIB controllers that support a nearly 8 megabyte/second transfer rate, are RoHS compliant, and use only 1.1W of power.)&lt;br /&gt;&lt;br /&gt;Another audience member, perhaps a little caught up in the excitement of LAN-based instrumentation, asked, "Why would anyone still use GPIB?  It's slow.  The cables are so inflexible."&lt;br /&gt;&lt;br /&gt;My jaw dropped at this.  I bet if you polled all the AutoTestCon attendees, just about every one of them is using GPIB, and is going to continue to use GPIB.  So my answer began with, "Because it just works!".&lt;br /&gt;&lt;br /&gt;"The GPIB cables are shielded and have rugged connectors that screw in and don't have plastic tabs that break off."&lt;br /&gt;&lt;br /&gt;[Bringing it back to LXI] "...the message of the LXI Consortium is that it's important to ensure that LXI works well with other buses."&lt;br /&gt;&lt;br /&gt;The reality is that our users are going to develop "hybrid" systems, using a mix of bus technologies.  Every bus has pros and cons.  GPIB has low communications latency and is rugged.  LXI has cheaper cabling and works well over extraordinarily long distances.  PXI and PXI Express have high communications bandwidth and low latency.&lt;br /&gt;&lt;br /&gt;And that's why it's my job at National Instruments to help ensure that &lt;span style="font-style:italic;"&gt;all&lt;/span&gt; forms of I/O work well in LabVIEW.&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/409469459/autotestcon-2008.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_3ziZaf8zuQ4/SOTmncDUNmI/AAAAAAAAAGs/efViFJM8CYU/s72-c/20080909_0007.jpg" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2008/10/autotestcon-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-3496725259152465085</guid><pubDate>Tue, 02 Sep 2008 14:22:00 +0000</pubDate><atom:updated>2008-09-02T09:36:26.224-05:00</atom:updated><title>AutoTestCon 2008 in Salt Lake City</title><description>I'll be in Salt Lake City next week, September 8-10, for AutoTestCon.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.autotestcon.com/index.php"&gt;AutoTestCon&lt;/a&gt; is a large Mil/Aero conference and trade show sponsored by the IEEE.&lt;br /&gt;&lt;br /&gt;I'll be doing a couple of presentations...&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;On Monday, I'm presenting as part of a seminar entitled, "VXI, PXI, IVI &amp; LXI Standards Improve ATE Systems Design".  I will be presenting the part about IVI.  I'll cover what IVI is, the current state of IVI, future work, as well as technical informationi on configuration, the differences between IVI-C and IVI-COM, and how to use class and specific drivers together.&lt;br /&gt;&lt;br /&gt;On Wednesday, I will be part of a panel discussion on "Test Applications Using LXI Instruments".  Hosted by Test &amp;amp; Measurement World chief editor Rick Nelson, the panel plans to share some of what we've learned over the past three years creating multi-vendor LXI-based test systems.&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/381414894/autotestcon-2008-in-salt-lake-city.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2008/09/autotestcon-2008-in-salt-lake-city.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-6734230615389001638</guid><pubDate>Mon, 04 Aug 2008 19:28:00 +0000</pubDate><atom:updated>2008-08-04T14:42:57.948-05:00</atom:updated><title>NIWeek 2008</title><description>It's Monday of NIWeek 2008, so it's a tradition for the Austin American-Statesman (the local newspaper) to have a nice article about NI.  Today's was about &lt;a href="http://www.statesman.com/business/content/business/stories/technology/08/04/0804nati.html"&gt;Green Engineering&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Today is Alliance Day, and the full-blown conference starts tomorrow.&lt;br /&gt;&lt;br /&gt;I'll be presenting again this year, on Thursday...&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;My topic is about using NI hardware and software products to work with LXI-based test systems.&lt;br /&gt;&lt;br /&gt;I'll be around the convention center all week, including the LAVA dinner Tuesday night, and the conference party on Wednesday.  Feel free to find me and say hi.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/355622823/niweek-2008.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2008/08/niweek-2008.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-4826729001188237574</guid><pubDate>Tue, 24 Jun 2008 21:00:00 +0000</pubDate><atom:updated>2008-06-24T16:01:48.778-05:00</atom:updated><title>Thoughts on Network Protocols for Instrumentation</title><description>Among my other responsibilities, I still hang out with the LXI crowd. Lots of conference calls, and a quarterly face-to-face meeting. (Thank you, &lt;a href="http://www.testforce.com/"&gt;TestForce&lt;/a&gt;, for hosting our recent meeting in Toronto.)&lt;br /&gt;&lt;br /&gt;Following up on my &lt;a href="http://openmeas.blogspot.com/2006/09/what-is-lxi.html"&gt;earlier blog post&lt;/a&gt;, National Instruments did join the LXI Consortium at some point (last year, I think). I believe that having one network-instrumentation standard to follow is better than having many, and the technical side of the consortium is constantly working to devise solutions to limitations inherent in a network-based test system.&lt;br /&gt;&lt;br /&gt;There are a variety of challenges revolving around the fact that LAN opens up the door to having more than one "controller" in a test system.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;In a test system using RS-232 or USB, for example, any single device talks to only a single "controller"—typically the test system's PC. A GPIB system is a form of network, but there's always one "controller in charge". Nobody can easily intrude into the test system.&lt;br /&gt;&lt;br /&gt;Is this a "feature", or a "limitation"? It all depends on the test system. What if you wanted to see test data from the outside world? Today, you'd probably put a network connection on your test PC, and let it serve up data through the LabVIEW Web Server, or store data into a corporate database.  Nobody could talk to the instruments directly; they would always go through the PC.&lt;br /&gt;&lt;br /&gt;But an alternative that LXI allows is to connect your private test network to the rest of your company's intranet (or the entire internet, if you want). This allows others to interact directly with the measurement instruments. You probably wouldn't want this feature in all test systems, but it opens the door to some interesting possibilities.&lt;br /&gt;&lt;br /&gt;Even if you don't connect your test network to the internet, you might still want to have more than one test PC talking to the devices. Or one grand vision of the consortium is that instruments can control other instruments. How does an instrument manage multiple connections from multiple controllers at once? Does this sound complicated? It is.&lt;br /&gt;&lt;br /&gt;And this is where the LXI Consortium comes in. What can the consortium do to make it "safe" to have more than one controller on your network?&lt;br /&gt;&lt;br /&gt;There are many aspects of this that the consortium is working on—defining behavior when there are too many connections for an instrument to handle, for example.  One particularly challenging problem is how to "reserve" or "lock" an instrument in your test program so that nobody else comes in and changes settings in the middle of your test.&lt;br /&gt;&lt;br /&gt;It's worse than that, really.  Just discovering instruments on your network can have the accidental side effect of interrupting a test program.  And it's especially this kind of inadvertent access to a test instrument that the consortium is trying to resolve.&lt;br /&gt;&lt;br /&gt;One step in this direction was announced in the &lt;a href="http://www.lxistandard.org/about/lxi_standards_and_clarifications/"&gt;LXI 1.2 standard&lt;/a&gt;.  There will be a new mechanism for discovering LXI devices that is less obtrusive than the current approach.  In the future, when instruments are available that support the next version of the LXI standard, this very common form of inadvertant access should be solved for future test systems.&lt;br /&gt;&lt;br /&gt;But there are still challenges with test systems with more than one computer or instrument trying to talk to a single device at the same time.  For that, we really need to be able to reserve the instrument for exclusive use by a single test program (or perhaps even a single part of a larger test program).&lt;br /&gt;&lt;br /&gt;This problem has been solved before in this domain.  In 2004, I helped write an article for T&amp;amp;M World entitled &lt;a href="http://www.tmworld.com/article/CA457475.html"&gt;Migrating to Ethernet&lt;/a&gt;.  I discussed the VXI-11 protocol for communicating with instrumentation over Ethernet.&lt;br /&gt;&lt;br /&gt;Because VXI-11 defines processing on both the host (PC) and client (instrument), it is able to provide a way to reserve or lock the instrument in a test program.  With VXI-11 devices, the VISA commands viLock and viUnlock can be used to lock the instrument so that it only responds to the program that has the lock.&lt;br /&gt;&lt;br /&gt;However, VXI-11 has kind of fallen out of favor with instrument vendors.  One reason is that it requires a fair amount of processing horsepower inside the instrument.  VXI-11 is based on a technology called RPC, or Remote Procedure Calls.  With RPC, much of the processing happens on the instrument, requiring more processing power, more memory, and thus, higher overall cost.&lt;br /&gt;&lt;br /&gt;Instrument vendors want to move to simpler protocols.  The consortium therefore needs to take a fresh look at instrument locking, and hopefully come up with a proposed solution in the 2009 or 2010 versions of the LXI standard.&lt;br /&gt;&lt;br /&gt;Until then, fortunately, most LXI instruments continue to support VXI-11 and you can use viLock or viUnlock (in LabVIEW, they are called "VISA Lock Async" and "VISA Unlock") to lock instruments in your test system.&lt;br /&gt;&lt;br /&gt;One caveat is that IVI drivers do not support the same kind of locking.  You need to have access to the VISA session to properly lock the device.  This is one of the benefits of using a LabVIEW Plug and Play (or for C users, VXIpnp) driver.  Since these kinds of drivers use the VISA session directly, you can easily add VISA Lock and VISA Unlock calls to your program without major rework.&lt;br /&gt;&lt;br /&gt;Stay tuned as the standards evolve.&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/319173687/thoughts-on-network-protocols-for.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2008/06/thoughts-on-network-protocols-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1809044529512477668</guid><pubDate>Mon, 05 May 2008 15:46:00 +0000</pubDate><atom:updated>2008-05-05T13:30:19.283-05:00</atom:updated><title>64-bit LabVIEW</title><description>&lt;p&gt;Last week, we &lt;a href="http://forums.ni.com/ni/board/message?board.id=170&amp;amp;thread.id=319502"&gt;announced the 64-bit LabVIEW beta&lt;/a&gt;. That announcement reveals a little about how I've spent the last couple of years of my life.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A long, long time ago, when I first started at NI, we were pretty proud of the fact that LabVIEW started its life as a 32-bit Macintosh application. We didn't suffer the pains of some applications that were having to live in (and later convert from) the 16-bit DOS and Windows environments.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But in some parts of the source code, we weren't as rigorous with our data types as we should have been. I asked the guy next to me, "Hey, Steve. Should I be worried about all these places we assume pointers fit into 32 bits?"&lt;/p&gt;&lt;br /&gt;&lt;p&gt;"No," he responded, "we do that all over the place. Somebody far in the future will have to go through all of LabVIEW and fix that."&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I did not know then that the "somebody" would be me.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;As I alluded to in my &lt;a href="http://openmeas.blogspot.com/2008/02/twenty-years.html"&gt;Twenty Years&lt;/a&gt; post, when I first started working on this, it seemed like an insurmountable task. LabVIEW source code is big, with a lot of developers having their hands in the code over time. And it's part GUI, part compiler, part runtime engine, and part kitchen sink.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Fortunately, I soon got help—a small, but really good team—and we just started plugging away at it. The little milestones along the way...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Compile the source code without errors&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Compile, link, and crash on launch&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Launch to Untitled 1&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Launch to the Getting Started window&lt;/li&gt;&lt;br /&gt;&lt;li&gt;etc.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;There was a snowball effect—we'd fix something, and then a whole bunch of stuff would start working.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I wouldn't say it's been easy. When we first started, I had a fair amount of skepticism... I had fears that we would hit a brick wall, or we'd discover something that would require more effort than we were willing to invest. That skepticism was justified. We had to make some tradeoffs to keep the project from getting out of hand.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;From a software engineering perspective, I think we did a good job of containing the risk to 32-bit LabVIEW while pushing forward with 64-bit LabVIEW. (All the code is shared.)  Perhaps more on that later.&lt;/p&gt;&lt;p&gt;I'm pretty happy with our level of quality in this beta release.  If you've got access to a 64-bit Windows machine, I encourage you to sign up for the beta and give it a try.  Here's a teaser for the kinds of things you'll be able to do.  (Click to enlarge the image.)&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_3ziZaf8zuQ4/SB9PtBNHWEI/AAAAAAAAAEM/fdAOyX-pcho/s1600-h/profile.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5196960129844992066" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_3ziZaf8zuQ4/SB9PtBNHWEI/AAAAAAAAAEM/fdAOyX-pcho/s320/profile.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/284112960/64-bit-labview.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_3ziZaf8zuQ4/SB9PtBNHWEI/AAAAAAAAAEM/fdAOyX-pcho/s72-c/profile.png" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2008/05/64-bit-labview.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-4259949358048345276</guid><pubDate>Thu, 21 Feb 2008 15:36:00 +0000</pubDate><atom:updated>2008-02-21T11:35:22.418-06:00</atom:updated><title>Twenty Years</title><description>&lt;p&gt;Last month, I celebrated twenty years at National Instruments.&lt;/p&gt;&lt;p&gt;One of the first things I learned about software development at NI is that food plays a prominent role. Back in the early days, it was mostly Double-Stuf Oreos®.&lt;/p&gt;&lt;p&gt;Hardly a day goes by without someone sending out a food announcement email—bagels, doughnuts, leftover party food. There's almost always a reason for the food: an anniversary, or "Thanks to Kevin for helping me figure out this problem", or "I broke the build".&lt;/p&gt;&lt;span class="fullpost"&gt;&lt;p&gt;During one test day, someone wrote a LabVIEW application that sits in the system tray (multi-platform, of course) and pops up to let you know that someone has brought in food. It also showed you the shortest path from your desk to the food. Who says testing isn't fun?&lt;/p&gt;&lt;p&gt;For my fifteen year anniversary, I bought fifteen dozen Krispy Kreme® doughnuts and scattered them around several floors of the building I'm in. It's frighteningly easy to buy 15 dozen doughnuts. They didn't bat an eye. They did offer to help carry them to my car.&lt;/p&gt;&lt;p&gt;For twenty years, I made a couple of desserts, both from the &lt;a href="http://www.hotellimpia.com/"&gt;Hotel Limpia &lt;/a&gt;(Fort Davis, Texas) cookbook. I made the most decadent chocolate brownies ever—containing about 20 pounds of chocolate and sugar. And in a feeble attempt to provide enough for everybody on the team, I made dozens and dozens of oatmeal raisin cookies.&lt;/p&gt;&lt;p&gt;But enough about food. That's not what keeps me coming back to this place every day.&lt;/p&gt;&lt;p&gt;Let's tie this all back to software engineering.&lt;/p&gt;&lt;p&gt;While software engineering is mostly about the process of developing software, one aspect of it has to cover how you get people to come into the office every day and do the work. Food is nice. Pay is important. But it's the cool projects that keep me coming back.&lt;/p&gt;&lt;p&gt;I'm working on a long-term project that I sooo want to be able to talk about. (Soon, soon.) I've been working on this project for a couple of years, and I still come in to work each day eager to work on it. What seemed like an insurmountable problem when I started is now within reach, thanks to a small and really good team we've put together.&lt;/p&gt;&lt;h3&gt;A Sense of Urgency&lt;/h3&gt;&lt;p&gt;There's a lot to be proud of as I look back over twenty years, but I come to work every day thinking about what's next. And maybe that's something to be proudest of—I helped build a software development process that is still one I want to be part of after twenty years.&lt;/p&gt;&lt;p&gt;I come to work every day with a sense of urgency. I think all good software teams do. It's not a sense of panic. Okay, maybe it occasionally approaches panic, but mostly it's under control. It's more wanting to relentlessly make progress, every day. A little bit more works every day, and soon we've worked past major obstacles. Celebrate briefly. And we keep going, because we're not done yet.&lt;/p&gt;&lt;p&gt;It's a whole lot like twenty years ago on the LabVIEW team. And that's a very good thing.&lt;/p&gt;&lt;p&gt;And my project is one of many. There are many other small teams here working on exciting things, with their own sense of urgency.&lt;/p&gt;&lt;p&gt;So I think it's pretty cool that after twenty years at the same job, I'm still having fun. We haven't run out of things to do. We haven't run out of ideas. We aren't "done" yet.&lt;/p&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/238918241/twenty-years.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2008/02/twenty-years.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-7673558401721255817</guid><pubDate>Wed, 05 Dec 2007 15:08:00 +0000</pubDate><atom:updated>2007-12-11T20:23:06.811-06:00</atom:updated><title>Linux and LXI Instrument Control</title><description>&lt;p&gt;A long time ago, I learned a lot about UNIX &amp;mdash; first, as a programmer at a well-run BSD shop, and later after joining NI, by becoming NI's system administrator for our lone Sun 3/160 workstation.  (That was in addition to my &lt;em&gt;real&lt;/em&gt; job of being a LabVIEW programmer.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've also been heavily involved in the UNIX/Linux flavors of LabVIEW... initially LabVIEW for Sun, and later, LabVIEW for HP-UX, LabVIEW for Concurrent PowerMAX, and LabVIEW for Linux.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So with great interest, I've noticed several new Application Notes from Agilent about Linux, the most recent of which is &lt;a href="http://cp.literature.agilent.com/litweb/pdf/5989-6717EN.pdf"&gt;Using Linux to Control LXI Instruments Through TCP&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;While these app notes provide some useful information, they typically show you how to do things the hard way.  With NI software, things are much easier...&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;For example, in the above-mentioned application note, you get to learn about socket calls, network byte ordering, and Nagle's algorithm for packet consolidation.  In another application note, &lt;a href="http://cp.literature.agilent.com/litweb/pdf/5989-6716EN.pdf"&gt;Using Linux to Control LXI Instruments Through VXI-11&lt;/a&gt;, you get to learn how to program remote procedure calls and the XDR format for data representation.&lt;/p&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;h3&gt;NI and Linux&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;One of the benefits of National Instruments' software is that we actually have Linux versions of LabVIEW, the LabWindows/CVI Run-Time Module, our I/O Libraries such as NI-VISA and NI-488.2, and some of our other device drivers such as NI-DAQmx.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So instead of having to learn how to write your own I/O libraries, and how to use the GNU Compiler Collection and debugging tools, you can work at a much higher level in a graphical system design language.&lt;/p&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;h3&gt;Instrument Drivers&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;LabVIEW is a portable language, which means that the functions (VIs) that you write can be moved from one flavor of LabVIEW (e.g., LabVIEW for Windows) to another (e.g., LabVIEW for Linux, or Macintosh, or Real-Time) and function correctly.  There are a few caveats to this...  Not all real-time targets have hard disks, so the File I/O functions don't work there.  Another example:  VIs that use OS-dependent technology, such as IVI-COM drivers that depend on Microsoft's ActiveX technology, are not portable.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So what to do about instrument drivers?  Agilent, in their application note &lt;a href="http://cp.literature.agilent.com/litweb/pdf/5989-6715EN.pdf"&gt;Using Linux in Your Test Systems: Linux Basics&lt;/a&gt; suggests "in most situations you do not need an instrument driver."  While true, it sidesteps the issue that instrument drivers are really valuable, since someone else has developed and debugged the code that deals with the nuances of specific instrument models.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Fortunately, the &lt;a href="http://ni.com/idnet/"&gt;National Instruments Instrument Driver Network&lt;/a&gt; contains thousands of LabVIEW Plug and Play instrument drivers.  These instrument drivers will work on Windows, Linux, MacOS X, and LabVIEW Real-time &amp;mdash; anywhere you have both LabVIEW and VISA.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What about IVI?  All IVI drivers are Windows only, but there's a way to get IVI-C drivers working on Linux.  They're no longer officially "IVI", but it can be done.  NI has an article entitled &lt;a href="http://zone.ni.com/devzone/cda/tut/p/id/3809"&gt;Porting IVI-C Specific Drivers and Applications to Linux&lt;/a&gt; that describes the steps.&lt;/p&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;p&gt;So to summarize, if you like doing things the hard way, the Agilent application notes lay out a nice roadmap.  The rest of you might want to consider NI's Linux products.  To learn more, see &lt;a href="http://ni.com/linux"&gt;ni.com/linux&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/195598612/linux-and-instrument-control.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/12/linux-and-instrument-control.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-3557527821253829823</guid><pubDate>Mon, 22 Oct 2007 17:32:00 +0000</pubDate><atom:updated>2007-10-22T14:46:26.877-05:00</atom:updated><title>LabVIEW in Public Places</title><description>&lt;p&gt;I've been traveling quite a bit lately.  That's my excuse for falling behind on the blog.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Having spent nearly twenty years of my life at National Instruments, I've gotten pretty good at detecting the presence of LabVIEW in the world around me.  For example, during the Tour de France coverage on TV, there was a short segment on the &lt;a href="http://www.lswt.com"&gt;San Diego Air &amp;amp; Space Technology Low Speed Wind Tunnel&lt;/a&gt;.  There was maybe one second of video showing software, and I call out, "That's LabVIEW."  Those buttons on the front panel are pretty recognizable.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I recently visited (as a tourist) the &lt;a href="http://www.omsi.edu/"&gt;Oregon Museum of Science and Industry&lt;/a&gt;, and found LabVIEW in the Vernier Technology Lab.  It's used to show how electrical activity in the heart is measured.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I also recently visited&amp;mdash;again as a tourist, this time with colleagues from Agilent&amp;mdash;the &lt;a href="http://www.deutsches-museum.de/"&gt;Deutsches Museum&lt;/a&gt; in Munich.  We went to the museum late in the afternoon one day, with only an hour before closing.  This is a big museum, so we were racing through trying to see as much as we could.  We ran across the &lt;a href="http://www.tumlab.de/"&gt;TUMLab&lt;/a&gt;, an engineering education lab in the museum, associated with the &lt;a href="http://portal.mytum.de/welcome"&gt;Technische Universit&amp;auml;t M&amp;uuml;nchen&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The lab was closed, but through the glass window, I could see a Lego robot.  This meant that LabVIEW was probably nearby.  I don't think my colleagues from Agilent were quite as excited by this discovery as I was.&lt;/p&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;p&gt;I never get tired of seeing LabVIEW in the "real world".  I'm proud to be part of the team that's made it possible.  And I'm especially proud we're helping educate the next generation of scientists and engineers.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/173462233/labview-in-public-places.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/10/labview-in-public-places.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-461418504998131591</guid><pubDate>Fri, 07 Sep 2007 14:30:00 +0000</pubDate><atom:updated>2007-09-07T11:15:43.810-05:00</atom:updated><title>NIWeek recap</title><description>&lt;p&gt;Michael Aivoliotis just published his &lt;a href="http://forums.lavag.org/blog/niweek2007/index.php?showentry=182"&gt;video interview of me&lt;/a&gt;.  That's prodded me into posting a quick NIWeek recap.  Thanks, Michael!&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;p&gt;I got the attendance numbers for my sessions.  A total of nearly 300 people attended my presentations.  Wow!  Thanks to everybody who came, and I hope the sessions were useful.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;"Software Engineering&amp;mdash;The NI Way" was very popular; we filled a large room.  I'm pleased that we had such great audience participation during this presentation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The LXI presentation had the least amount of interest, but I think we had a good selection of attendees there.  I showed unreleased products from both NI and Rohde &amp;amp; Schwarz.  A big thank you to David Owen from Pickering Test, and Johannes Ganzert from Rohde &amp;amp; Schwarz, for loaning equipment for my demo.  Afterwards, one attendee said that my presentation was "better than the one Agilent gives".  I haven't seen Agilent's LXI presentation, but that sounds like a good compliment.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Another highlight for me is that one of the stars of NIWeek came to my Instrument Control Bus Comparison presentation.  If you didn't attend the Thursday NIWeek keynote, you should visit the &lt;a href="http://www.ni.com/niweek/keynote_videos.htm"&gt;NIWeek Keynote Videos&lt;/a&gt; web page.  Click on the Thursday tab, and watch the 8-minute video entitled, "Future Scientists and Engineers - An Interview with Samuel Majors".  I think you'll be inspired.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I was honored to meet Samuel, but I was even more pleased that I was able to connect him with Jim Kring, the co-author of one of Samuel's favorite books, &lt;a href="http://www.amazon.com/LabVIEW-Everyone-Programming-Instruments-Instrumentation/dp/0131856723/ref=cm_taf_title_featured?ie=UTF8"&gt;LabVIEW for Everyone&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I also had a great time at the LAVA Barbecue at the Salt Lick.  Somebody needs to tell Chris Relf that I already paid. ;-)  My car (and Nancy Hollenback and I) made a cameo appearance near the end of &lt;a href="http://forums.lavag.org/blog/niweek2007/index.php?showentry=179"&gt;another Michael A. video&lt;/a&gt;.  We had a great time.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/153498853/niweek-recap.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/09/niweek-recap.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-4591032085432015948</guid><pubDate>Wed, 01 Aug 2007 18:37:00 +0000</pubDate><atom:updated>2007-08-01T14:40:54.699-05:00</atom:updated><title>My NIWeek 2007 Sessions</title><description>&lt;p&gt;I hope you are attending NIWeek, and that you are planning to attend at least one of my NIWeek presentations...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Software Engineering - The NI Way&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Using LabVIEW in an LXI-Based Test System&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Head-to-Head High-Speed Bus Comparison: GPIB, PCI, PCI Express, USB, and Ethernet/LAN&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Read more below for details on each presentation...&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;h3&gt;Software Engineering - The NI Way&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Wednesday, 3:30 PM, Room 12A&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Join me for an interactive discussion about how NI develops software.  When I first joined NI nearly 20 years ago, our software development process was, shall I say, "underdeveloped".  Fortunately, we've been improving ever since.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I'll talk about how our process has evolved as our team and code have gotten bigger.  I'll talk about and demo some of the tools we use.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This topic is significantly more interesting with audience participation, so bring your own thoughts and stories about how you develop software.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Using LabVIEW in an LXI-Based Test System&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Wednesday, 4:45 PM, Room 17A&lt;/p&gt;&lt;br /&gt;&lt;p&gt;LXI is a relatively new standard for LAN-based test and measurement instrumentation.  As many of you know, I represent NI at LXI Consortium meetings.  You may have read my earlier blog postings about &lt;a href="http://openmeas.blogspot.com/2006/09/what-is-lxi.html"&gt;What is LXI?&lt;/a&gt; and &lt;a href="http://openmeas.blogspot.com/2006/10/lan-is-simple-right.html"&gt;LAN is Simple, Right?&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In this presentation, I'll show how you can use NI hardware and software to control an LXI-based system.  I've put together a system containing LXI devices from Rohde &amp;amp; Schwarz, Pickering Interfaces, and Agilent.  (Thanks to the vendors who loaned me their equipment!)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This NIWeek presentation is heavy on demos and light on slides.  I'll show you everything from simple instrument communciations to advanced synchronization and timing.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Head-to-Head High-Speed Bus Comparison: GPIB, PCI, PCI Express, USB, and Ethernet/LAN&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Wednesday, 10:30 AM, Room 17B&lt;br&gt;&lt;br /&gt;Thursday, 2:15 PM, Room 13B&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The typical test system these days includes instrumentation with a variety of interfaces.  You might have a mix of simple PXI devices, legacy GPIB instruments, and perhaps a LAN or USB device thrown in.  This presentation will shed some light on the strengths and weaknesses of various buses, including performance, cost, and ease of use.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/139692322/my-niweek-2007-sessions.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/08/my-niweek-2007-sessions.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-3538365582566986463</guid><pubDate>Mon, 30 Jul 2007 22:40:00 +0000</pubDate><atom:updated>2007-07-30T17:44:13.798-05:00</atom:updated><title>Pop Quiz Answer</title><description>&lt;p&gt;Nobody answered my pop quiz!&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Pop Quiz:&lt;/em&gt; Default data on a front panel control is useful, for example, when the control is on the connector pane, but isn't wired in the caller's diagram. The subVI runs with the default value in that case. When is default data on an indicator useful?&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Read more for the answer...&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;We pass data out of subVIs through its indicators that are on the connector pane. But what if an indicator doesn't receive any data while the subVI runs? In that case, we use the indicator's default data and pass that out to the caller.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A picture helps. Here are the two frames of a case structure...&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_3ziZaf8zuQ4/RqjYNU4I3cI/AAAAAAAAAB0/fjgky0H1kH0/s1600-h/condind.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_3ziZaf8zuQ4/RqjYNU4I3cI/AAAAAAAAAB0/fjgky0H1kH0/s320/condind.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5091557102196415938" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;This is an example of a conditional indicator. The indicator is only updated in one frame. If the VI never executes that frame, no data ever reaches the terminal for the indicator. When the indicator's data is passed out of the connector pane, the default data for the indicator is used in that case.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So in the example above, I made the default data for "My Conditional Indicator" the value 456. I put the "Case?" Boolean and the "My Conditional Indicator" on the connector pane and saved the VI. In the calling VI, if I pass True, I get the result "123". If I pass False, I get "456". Make sense?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Why did I bring this up in a posting about performance? Because it affects memory usage. LabVIEW has to account for two different ways that a conditional indicator can be updated (through a wire or by copying the default data). This interferes with the in-place algorithm and means that LabVIEW can't be as efficient with memory usage.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Conditional indicators aren't typically needed. I could have achieved the same effect with the following diagram...&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_3ziZaf8zuQ4/Rq5pKE4I3eI/AAAAAAAAACE/JQuSDriHWMg/s1600-h/condind2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_3ziZaf8zuQ4/Rq5pKE4I3eI/AAAAAAAAACE/JQuSDriHWMg/s320/condind2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5093123850431421922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;(Or, for simple things like this, I could have used the Select function.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, you might want to look at your own code for places you are using conditional indicators to see if you can improve your memory usage. I wouldn't worry much about scalars and other small data, but if you have large arrays or strings, this can make a difference.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/138997884/pop-quiz-answer.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_3ziZaf8zuQ4/RqjYNU4I3cI/AAAAAAAAAB0/fjgky0H1kH0/s72-c/condind.png" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2007/07/pop-quiz-answer.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1692934819700518091</guid><pubDate>Thu, 26 Jul 2007 16:30:00 +0000</pubDate><atom:updated>2007-07-26T11:23:54.688-05:00</atom:updated><title>NIWeek 2007</title><description>&lt;p&gt;NIWeek 2007 is fast approaching on August 7-9.  If you use NI products (or are thinking of using them), this is an awesome event.  Dozens of technical sessions, amazing keynotes, and scores of exhibitors.  In addition, we have special summits for Graphical System Design, RF and Wireless Communications, Sound and Vibration, and Vision applications.  Register now at &lt;a href="http://niweek.com"&gt;niweek.com&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Staying informed during NIWeek&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Whether or not you are attending NIWeek, watch the &lt;a href="http://forums.lavag.org/blog/niweek2007/"&gt;NIWeek Blog&lt;/a&gt; by Michael Aivaliotis.  Videos and stories throughout NIWeek.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The official &lt;a href="http://twitter.com/niweek"&gt;NIWeek Twitter link&lt;/a&gt; can keep you informed of late-breaking NIWeek news.  Or maybe you can just twitter each other during my presentation about how great it is. ;-)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Speaking of my presentations, I have three this year...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Software Engineering - The NI Way&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Using LabVIEW in an LXI-Based Test System&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Head-to-Head High-Speed Bus Comparison: GPIB, PCI, PCI Express, USB, and Ethernet/LAN&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;I'll post more information on these as we get closer.&lt;/p&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/137652952/niweek-2007.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/07/niweek-2007.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-4015789747008628407</guid><pubDate>Fri, 22 Jun 2007 01:00:00 +0000</pubDate><atom:updated>2007-06-21T20:01:10.776-05:00</atom:updated><title>Yet another kind of data</title><description>&lt;blockquote&gt;&lt;strong&gt;Note...&lt;/strong&gt; I'll be in Vancouver, B.C., for next week's &lt;a href="http://sine.ni.com/apps/utf8/nievn.ni?action=display_offering&amp;offering_id=442777&amp;site=NIC&amp;state=BC&amp;node=61120&amp;l=US"&gt;LabVIEW Developer Education Days&lt;/a&gt; on June 26.  I hope to see some of you there.&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;As I mentioned last time, there's a fourth kind of data that can show up in the profile window...&lt;strong&gt;Default Data&lt;/strong&gt;.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I'll go back to the simple VI I used in the last posting.  It's an array of int8's wired to an array of int8's.  The default value of each array is empty.  This means that when I load the VI into memory, the front panel doesn't have the arrays allocated.  (And the VI only takes up about 8 kilobytes of disk space.)  For my earlier profiling tests, I was typing a new value into the millionth element of the array control, which allocates the million bytes for it.  When I ran this VI, it consumed five megabytes of data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now let's see what happens when I go ahead and "Make Current Value Default" for the million-byte array...&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_3ziZaf8zuQ4/RnhYkm2rM3I/AAAAAAAAABU/a0bXGmiPmRI/s1600-h/blog1-profwin.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_3ziZaf8zuQ4/RnhYkm2rM3I/AAAAAAAAABU/a0bXGmiPmRI/s320/blog1-profwin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5077905965788640114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;When I run the VI (and I've run it more than once, so you can see the final values in the profile window), you see that the five megabytes has turned into six megabytes.  The profile window is now showing you that there's an extra megabyte of memory being consumed by this VI, because of the default data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;To take it a step further, if I also made the indicator array's data the default, I'd be growing the memory consumption to seven megabytes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Default data is often a good thing, but we sometimes find VIs where we've saved a large amount of data as default accidentally.  This is easy to do if you select the "Make All Current Values Default" menu item from the Edit menu.  I try to stay away from this menu item, and instead only set the default value for the controls I know that need it.&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;Pop Quiz:&lt;/em&gt;  Default data on a front panel control is useful, for example, when the control is on the connector pane, but isn't wired in the caller's diagram.  The subVI runs with the default value in that case.  When is default data on an indicator useful?&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Note that the VI Analyzer reports non-empty default values for arrays so that you can take a closer look at them.  (The VI Analyzer is a separate add-on for LabVIEW that can check your VIs for common programming errors, style conformance, and in this case, performance issues.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Interesting side note...&lt;/em&gt; When I save my new test VI to disk, how much disk space do you think it consumes?  Seven megabytes?  Two megabytes?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It turns out that it takes up about 8 kilobytes, which is about what it took when I hadn't saved any default data.  Why is that?  It's because my default data was entirely made up of zeros.  The VI's data gets compressed when it's saved, and a million zeros compresses very well.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Just for fun, I created an identical VI with a million bytes of random data saved as default data for each front panel array.  That VI took about 1.2 megabytes on disk&amp;mdash;still, that's a 40% savings over the uncompressed data, which is pretty good, I think.  (Your mileage may vary.)&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/126871098/yet-another-kind-of-data.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_3ziZaf8zuQ4/RnhYkm2rM3I/AAAAAAAAABU/a0bXGmiPmRI/s72-c/blog1-profwin.png" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2007/06/yet-another-kind-of-data.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1067448862412971553</guid><pubDate>Tue, 19 Jun 2007 22:30:00 +0000</pubDate><atom:updated>2007-06-19T17:30:42.836-05:00</atom:updated><title>LabVIEW Performance and Memory Management</title><description>&lt;p&gt;When I talk about performance optimization in LabVIEW, I pretty quickly focus on memory management issues.  Memory isn't the only concern.  It's just that memory issues are sometimes the hardest to understand.  Plus, since LabVIEW is a dataflow language, we have a lot of emphasis on the data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;One way to monitor memory usage in LabVIEW is to use the profiler.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_3ziZaf8zuQ4/RnWZZW2rMzI/AAAAAAAAAA0/T8B0kUuAXRQ/s1600-h/profile-menu.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_3ziZaf8zuQ4/RnWZZW2rMzI/AAAAAAAAAA0/T8B0kUuAXRQ/s320/profile-menu.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5077132815840785202" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;Select Profile Memory Usage to see how much memory each of your VIs is consuming.&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_3ziZaf8zuQ4/RnWZjG2rM0I/AAAAAAAAAA8/0S5lnPzg6Ik/s1600-h/profile-window1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_3ziZaf8zuQ4/RnWZjG2rM0I/AAAAAAAAAA8/0S5lnPzg6Ik/s320/profile-window1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5077132983344509762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;Here's a simple VI I wrote that contains an array control wired to an array indicator.  I changed the data type of the array element to be a 1-byte integer.  This makes it easy to see how much memory the array is taking--one million array elements equals one million bytes.  (If we had an array of doubles, one million array elements equals eight million bytes.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've initialized the control to have one million elements.  (Actually, 1,000,001, but who's counting. ;-)  Before I run the VI, it is using 1 million bytes for its data--the indicator is an empty array.  The profiler won't show you this; it doesn't do its thing until you run the VI.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Okay, once I run the VI, how much memory do you think it takes?  Let's see what the profiler says...&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_3ziZaf8zuQ4/RnWZjG2rM1I/AAAAAAAAABE/wvPrgESvF-w/s1600-h/profile-window2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_3ziZaf8zuQ4/RnWZjG2rM1I/AAAAAAAAABE/wvPrgESvF-w/s320/profile-window2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5077132983344509778" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;Approximately 4 million bytes!  What's going on?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In my last blog entry, I said I'd tell you about the three kinds of data in LabVIEW, and they're all showing up in this profile result.  The three types of data are...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Operate Data&lt;/strong&gt;&amp;mdash;Every front panel control and indicator keeps data that we call the "operate data".&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Execute Data&lt;/strong&gt;&amp;mdash;Every wire on the diagram represents a buffer of data.  The data for the diagram is called "execute data" or "execution data".&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Transfer Data&lt;/strong&gt;&amp;mdash;Buffer used to isolate execution threads (which work with execution data) from the user interface thread (which works with operate data).&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;So why do we need these three kinds of data?  As we'll see in later postings, the diagram likes to share execution data buffers among parts of the diagram, so the data that originally came from a control can get overwritten with intermediate and final results as the VI executes.  You don't want front panel control's data to be changing while the VI runs, though!  This means that we have to have a separation between the diagram and the panel.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The transfer buffer is used as an optimization in LabVIEW's multithreaded execution system.  When the diagram wants to send data to an indicator, it has to work with LabVIEW's user interface thread to draw the data.  There can be many execution threads, but there's only one user interface (UI) thread.  Thus, the UI thread can potentially be a big bottleneck if all those execution threads had to sit and wait for it.  That's where the transfer buffer comes in.  It's a buffer that both the UI thread and execution threads can quickly access without (usually) blocking.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So when a block diagram updates an indicator, the execution data is copied to the transfer buffer by an execution thread, and some time later, the UI thread reads the transfer buffer and copies the data to the operate data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So back to our example.  We have a million bytes in the control (operate data), a million bytes in the control's transfer buffer, a million bytes on the wire (execute data), a million bytes in the indicator's transfer buffer, and a million bytes in the indicator (operate data).  That adds up to five million bytes, right?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But the profile window said four million.  What's the deal?  Recall that I said that the profiler does its thing while the VI is running.  It turns out that in this simple diagram, the VI stops running before the UI thread has had a chance to make the last copy of the data (from the transfer buffer to the indicator's operate data).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When profiling, I tell people to run their VIs a few times to make sure that buffers are allocated.  If I run the VI again, I'll now see five million bytes...&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_3ziZaf8zuQ4/RnWZjW2rM2I/AAAAAAAAABM/-_YssuKp0RQ/s1600-h/profile-window3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_3ziZaf8zuQ4/RnWZjW2rM2I/AAAAAAAAABM/-_YssuKp0RQ/s320/profile-window3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5077132987639477090" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;If this were a more realistically complicated VI, there's a good chance that the profiler would have counted all the data the first time.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Next up...&lt;/em&gt; I lied.  There's a fourth kind of data that can show up in the profile window.  What is it?&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/126217103/labview-performance-and-memory.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_3ziZaf8zuQ4/RnWZZW2rMzI/AAAAAAAAAA0/T8B0kUuAXRQ/s72-c/profile-menu.PNG" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2007/06/labview-performance-and-memory.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-5812312990790481661</guid><pubDate>Wed, 13 Jun 2007 14:33:00 +0000</pubDate><atom:updated>2007-06-15T10:11:08.906-05:00</atom:updated><title>LabVIEW Performance, The Early Years</title><description>&lt;p&gt;I started working at NI in 1988, when LabVIEW 1 was shipping.  LabVIEW 1 was &lt;em&gt;so&lt;/em&gt; cool. But once you got past the awesome (for the 1980's) graphics and graphical programming paradigm and started to use it for real work, you noticed that it was a tad slow.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We learned a lot doing LabVIEW 1. So much so that we decided to throw away the source code and start over with LabVIEW 2. While LabVIEW 1 was an interpreted language, LabVIEW 2 was built from the ground up to be compiled.  And when it came out in 1990, LabVIEW 2.0 demonstrated much better performance.  For some applications, it was an order of magnitude or more faster.  (So fast, in fact, that we ran into problems talking to many GPIB instruments that couldn't keep up with commands we were sending.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;LabVIEW 3 released in late 1993, and was the first version of LabVIEW that unified our original Macintosh codebase with our PC and Sun versions.  Soon after, I created the first presentation to customers about LabVIEW performance...&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;In May 1994, I was invited to Sweden to present "Tips &amp;amp; Techniques for Improving LabVIEW Performance". It discussed how to take advantage of the many performance optimizations available in LabVIEW, and also discussed patterns to avoid, such as local variables. (Don't worry, I'll cover these in subsequent postings.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;My presentation was based on some earlier technical notes, as well as an article by Monnie Anderson in the now defunct &lt;em&gt;LabVIEW Technical Resource&lt;/em&gt;.  (&lt;em&gt;LabVIEW Memory Secrets&lt;/em&gt;, Volume 2, Number 1, Winter 1994)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Before I left for Stockholm, I practiced the presentation in front of the LabVIEW team. This turned out to be a great experience&amp;mdash;I presented to the toughest audience first. It did yield one unexpected result: the LabVIEW development team did not agree on how LabVIEW worked!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;More precisely, I had found a common situation where LabVIEW made an extra copy of data that unexpected and unnecessary. Within a few days, our compiler expert had a fix that later came out in LabVIEW 3.1.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Why am I telling you these stories? Even though the latest LabVIEW is many orders of magnitude faster than LabVIEW 1, and even though we can handle much more complicated applications than we could a couple of decades ago, we're not resting. We're still working on performance issues today.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example, we've seen much growth in the use of multi-core processors in affordable PCs.  While LabVIEW has been ahead of this curve and able to take advantages of multiple processors and cores since our 1998 release of LabVIEW 5.0, we're continuing to look at new ways to leverage all this computing power.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Another reason for these stories is to make it clear that performance issues are sometimes difficult to understand. And I'm hoping that my future blog posts will help clarify these for you.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Next up...&lt;/em&gt; The three kinds of data in LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/125114987/labview-performance-early-years.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/06/labview-performance-early-years.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-2844083411914148842</guid><pubDate>Tue, 12 Jun 2007 22:45:00 +0000</pubDate><atom:updated>2007-06-13T09:33:39.345-05:00</atom:updated><title>Expanding Scope</title><description>&lt;p&gt;I returned recently from a couple of trips lamenting that I haven't been keeping this blog current. I was visiting customers in Massachusetts, Connecticut, and Colorado, discussing topics ranging from "performance optimization" to "software engineering". It occurred to me that my blog's current focus isn't keeping up with my everyday work life.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I spend a lot of my day at NI working on "next year's LabVIEW". It's cool stuff. You'll like it. But it doesn't produce much fodder for my blog, because I can't talk about specifics yet.  Also, my current project is pretty far-reaching, and doesn't fit neatly into just "data acquisition and instrument control".&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, I'm going to start expanding the scope of my blog a little to cover a few more topics that I care about&amp;mdash;and that many of you have told me that you care about, too.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Coming soon...&lt;/em&gt;  The first of several postings about performance issues.  If you have other LabVIEW-related topics you'd like me to cover, please post a comment or send an email.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;!-- Type rest of the post here --&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/124518690/expanding-scope.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/06/expanding-scope.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-9211336065419057634</guid><pubDate>Fri, 20 Apr 2007 12:30:00 +0000</pubDate><atom:updated>2007-04-20T07:37:51.134-05:00</atom:updated><title>A Good Cause</title><description>&lt;p&gt;Today's the day I leave for the MS-150, a two-day, 180-mile bike ride from Houston to Austin, Texas.  I'll be riding along with 12,000 other friends and strangers to raise money for the National Multiple Sclerosis Society.  This is my third year to do the ride.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Am I ready?  Hmm.  I'm not sure I can ever be "ready" for a 180-mile bike ride.  It is definitely hard.  It's also fun to be doing this with nearly a hundred of my co-workers.  And I take pride in my own personal accomplishment, as well as being able to help the National MS Society.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;My goal is to raise $1500 for the society.  The National MS Society is a 501(c)(3) organization, so your donation may be tax deductible.  Your donation benefits thousands of people affected by multiple sclerosis.  You can donate online here...&lt;br&gt;&lt;a href="http://ms150.org/edon.cfm?id=190138"&gt;http://ms150.org/edon.cfm?id=190138&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can learn more about the society, about multiple sclerosis, and about the bike ride here...&lt;br&gt;&lt;a href="http://ms150.org/ms150/about_ms_society.cfm"&gt;http://ms150.org/ms150/about_ms_society.cfm&lt;/a&gt;&lt;/p&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/93635336/good-cause.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/02/good-cause.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1117931635630752102</guid><pubDate>Tue, 20 Feb 2007 00:07:00 +0000</pubDate><atom:updated>2007-02-19T18:18:21.425-06:00</atom:updated><title>La Mort du Serpdrv</title><description>&lt;p&gt;A series of "interesting" events have conspired to keep me away from my blog lately, so I decided to write about something "juicy" to start things back up. (Where "juicy" means "controversial for people who have been using LabVIEW for more than five or so years". ;-)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Today's topic is about an entity named "serpdrv", mentioned in &lt;a href="http://openmeas.blogspot.com/2006/08/so-many-choices.html"&gt;an earlier post&lt;/a&gt;. This entity provided serial (RS-232) support for LabVIEW 2.5 through LabVIEW 6.x. In LabVIEW 7, I arranged for its demise. This posting will talk a little about how it came into existence, and how it made its exit. You'll hopefully gain some insight into how we reach the decision to phase out aging features.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;In January of 2002, I posted a message to the Info-LabVIEW mailing list to help a LabVIEW user solve a problem with his serial I/O. Near the end of my posting, I inserted the following text...&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;I will again encourage people to use VISA for all future serial port development. At some point, I would like to see the "serpdrv" VIs go away. (And since I'm the decision-maker on this, it'll probably happen. :-)&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;And thus began an outpouring of support for this little thing we call "serpdrv".&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It's also the day that I started an internal document called "La Mort du Serpdrv", to start my plan to remove "serpdrv" from LabVIEW. You can construe the existence of this document a couple of ways. Some might consider it our battle plan to kill off the feature. I personally considered it a place to gather user feedback, document shortcomings and features of serpdrv, and come up with a plan to strengthen our other options for serial I/O so that removing serpdrv would be easier.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;The Birth of Serpdrv&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;LabVIEW 1 and 2, as many of you recall, were only available on the Apple Macintosh. Macs had &lt;a href="http://en.wikipedia.org/wiki/EIA-422"&gt;RS-422&lt;/a&gt; serial ports, disguised as the "modem" and "printer" ports. They were quirky not only from a hardware perspective, but also from software. On the old Macs, you used the "Device Manager" to talk to the serial drivers named ".Ain", ".Aout", ".Bin", and ".Bout". &lt;a href="http://en.wikipedia.org/wiki/Inside_Macintosh"&gt;Inside Macintosh&lt;/a&gt; described the data structures for the driver and how to get the serial port to do all the right things.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In LabVIEW, we created some low-level primitives for this Macintosh Device Manager. We then built the serial VIs on top of the Device Manager primitives. (And as I recall, we built GPIB and DAQ VIs on top of those same Device Manager primitives to get to our own devices.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When we ported LabVIEW to Windows and SunOS, we needed to invent a cross-platform approach to serial I/O. Every platform did something completely different, so we made a decision not unlike many other decisions of the day: Let's make everything look like a Mac.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, we invented a Device Manager for LabVIEW for Windows and Sun that looked like the Apple Device Manager. Then we intented Macintosh-like "drivers" that plugged into our new proprietary device manager. Constrained by the Windows 8.3 filenaming conventions of the day, we used the names "serpdrv", "gpibdrv", and "daqdrv" for those low-level drivers.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And that's how things stayed for the next several years.  Our GPIB and DAQ support eventually switched to more modern technology.  Serpdrv, however, remained.  We'd fix the occasional bug, but the overall structure of serpdrv stayed the same.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;And Then There Was VISA...&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Around the time of LabVIEW 4.1 and 5.0, NI-VISA came into existence.  Among other things, VISA could read and write to serial ports and the GPIB.  At first, it wasn't as good at serial I/O as "serpdrv", and it wasn't as good at GPIB as our NI-488.2 driver.  What VISA had going for it is that it was a combined API layer that made serial and GPIB devices look nearly the same.  Since many hardware devices had both GPIB and RS-232 options, we could write a single instrument driver with VISA, and it would work regardless of the I/O option in the device.  (And the benefit continues to this day with USB- and LAN-based instruments.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Around the LabVIEW 5 and 6 timeframe, I became the manager of the part of LabVIEW that was responsible for all the forms of I/O.  Among many other things, I was responsible for "serpdrv", and I was responsible for ensuring that VISA worked well in LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Even then, "serpdrv" was legacy code that only one person (not me) really understood.  I remember investigating a problem where hardware flow control didn't work.  The code to handle flow control clearly didn't match what Microsoft said it should.  So I changed it.  But that broke something else.  This is where I start to question whether we need two ways to do serial I/O in LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Making VISA better&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;So I put out a challenge to the VISA group...  "Remove the barriers that keep VISA from replacing serpdrv."&lt;/p&gt;&lt;br /&gt;&lt;p&gt;VISA already had a lot of things going for it.  It was a better API for LabVIEW.  It had more features, such as control over individual hardware lines.  It also had fewer bugs&amp;mdash;for example, hardware flow control worked.  On the other hand, it was slower and bigger.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The NI-VISA group responded to the challenge.  The speed problems were caused by extra threading overhead in the driver.  It didn't take long for VISA to be faster than "serpdrv" for serial I/O.  They also created a small VISA serial runtime that the LabVIEW Application Builder could use for deployment.  It wasn't as tiny as "serpdrv", but it was a big improvement over the tens-of-megabytes for the full VISA driver.  And then we had to work through some VISA licensing issues so that LabVIEW users could freely distribute applications that used the VISA serial runtime.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What our customers didn't see was a lot of internal discussion and &lt;em&gt;angst&lt;/em&gt;.  Besides feedback from external customers, we also had feedback from our own FieldPoint group.  They had industrial controllers with very limited processing and memory capability.  Switching to VISA was a bigger deal for them than for most of our external customers.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;And "serpdrv" disappears...&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;By LabVIEW 7, VISA had improved and I decided that we could proclaim that it was good enough that we could deprecate "serpdrv".  We created a set of compatibility VIs that presented the old API, but it was built on top of the VISA functions.  Many people did not notice.  Some did, leading to another round of commentary on Info-LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It didn't take long for somebody to figure out that the old "serpdrv" VIs would still work in LabVIEW 7.  This gives our customers an "out" if they absolutely don't want to use VISA for serial I/O.  While not supported (or even tested), they should still work in LabVIEW 8.x, too.  That's because the mysterious Device Manager primitives are still in LabVIEW.  But that won't always be the case, and I can announce to you today that we'll remove the Device Manager interface in a future version of LabVIEW.  I don't know when, but it's going to happen.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Moving on...&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;So I want you to realize that we do agonize over changes like this.  Before we started, VISA was in many ways superior to the old serial VIs.  Not satisfied, we put in a substantial amount of additional effort to make it better still.  I still look back over my shoulder to see if I've missed something, but I'm confident that "serpdrv" won't be coming back.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/93075930/la-mort-du-serpdrv.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2007/02/la-mort-du-serpdrv.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-6712600960337180500</guid><pubDate>Fri, 29 Dec 2006 23:00:00 +0000</pubDate><atom:updated>2006-12-29T16:59:34.927-06:00</atom:updated><title>Using IVI-C and VXIpnp Drivers in LabVIEW</title><description>&lt;p&gt;Happy end of 2006 to everybody out there.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In earlier &lt;a href="http://openmeas.blogspot.com/2006/08/more-on-instrument-drivers.html"&gt;posts&lt;/a&gt;, I've talked about the various kinds of instrument drivers.  All of the modern types of instrument drivers work reasonably well in LabVIEW, but some work better than others.  Specifically, LabVIEW Plug and Play instrument drivers (written in native LabVIEW source code) give LabVIEW users the best experience.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But not all instrument drivers are written in LabVIEW.  This post talks about instrument drivers written in C, and how to bring them into the LabVIEW environment.  C is considered a kind of "universal language"; C compilers are available for a huge number of platforms.  So, vendors whose mission is to write a single driver that is usable on many platforms in many different environments often write a driver in C.  (Though a reminder from an &lt;a href="http://openmeas.blogspot.com/2006/09/ivi-c-and-ivi-com.html"&gt;earlier post&lt;/a&gt;, the one-size-fits-all instrument driver isn't a particularly good idea.)&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;The first step in using a C-based driver in LabVIEW is to turn the C code into a DLL or Shared Library.  Often, the person who wrote the driver does this for you, at least for Microsoft Windows.  How to compile the driver is left as an exercise for the reader.  My focus is on making the resulting shared library usable in LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;To use a shared library (DLL) in LabVIEW, you use the Call Library Node (CLN) function on the diagram.  You configure a CLN for every function you want to call.  Typically, you create a single VI for each C function, and then use these VIs in higher-level diagrams.  (Click to enlarge)&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_3ziZaf8zuQ4/RZV7Em3YHOI/AAAAAAAAAAM/EP1tgSpMlzo/s1600-h/cln.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_3ziZaf8zuQ4/RZV7Em3YHOI/AAAAAAAAAAM/EP1tgSpMlzo/s320/cln.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5014049079229422818" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;As you can imagine, if you have a shared library with dozens or hundreds of entry points, it can be tedious to make these VI wrappers.  Fortunately, we have tools to make this easier.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Kinds of C-based Instrument Drivers&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Broadly speaking, there are three different kinds of C-based instrument drivers...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Drivers that do not conform to VXIpnp standards&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Drivers that conform only to VXIpnp standards&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Drivers that conform to both VXIpnp and IVI-C standards&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;The more standards a C-based driver conforms to, the more we know about how it is structured.  The more we know about it, the better job we can do pulling the driver into the LabVIEW environment.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For drivers that don't conform to VXIpnp, we can't make any assumptions at all.  We see this more often with somewhat esoteric instruments, or instruments from industries other than traditional test &amp;amp; measurement.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For VXIpnp drivers, we know they have an Initialize, a Close, a certain form of error checking, and a few other details.  We don't know anything about instrument-specific functionality, such as whether a device is a DMM, a Scope, or something else.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;IVI-C drivers go a step further, and define more of the API, at least for certain classes of instruments (such as DMMs, Scopes, Switches, etc.).  This lets us more intelligently bring these drivers into the LabVIEW environment.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Tools for Importing&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;There are two separate LabVIEW tools you can use to help import these drivers.  The first is the &lt;strong&gt;DLL Import Wizard&lt;/strong&gt;, for importing generic (not VXIpnp or IVI-C) DLLs.  The NI web site has a &lt;a href="http://zone.ni.com/devzone/cda/tut/p/id/2818"&gt;tutorial&lt;/a&gt; about this tool, so I won't go into much detail about it here.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you have a VXIpnp or IVI-C driver, you want to use a different tool&amp;mdash;the &lt;strong&gt;LabVIEW Instrument Driver Import Wizard&lt;/strong&gt;, found on &lt;a href="http://www.ni.com/devzone/idnet/development.htm"&gt;Instrument Driver Development Tools and Resources&lt;/a&gt; page on ni.com.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Unlike the generic DLL Import Wizard, the Instrument Driver Import Wizard is able to use its knowledge of the VXIpnp and IVI-C standards to create better wrapper VIs.  It even makes an attempt to translate the C terminology in the help to LabVIEW terminology.  Here's an example, showing the original C help and the translation into LabVIEW terminology...(Click to enlarge)&lt;/p&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_3ziZaf8zuQ4/RZWKU23YHQI/AAAAAAAAAAk/fbhfVVtT-pE/s1600-h/fl45-help.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_3ziZaf8zuQ4/RZWKU23YHQI/AAAAAAAAAAk/fbhfVVtT-pE/s320/fl45-help.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5014065851076713730" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;The Instrument Driver Import Wizard understands VISA and IVI refnum data types, it knows how the driver does error checking, and it creates better icons.  It isn't perfect&amp;mdash;there's a very good chance that you will want to tweak some of the resulting VIs to improve front panel layout, connector panes, and help.  You may also want to clean up parameters to make them easier to use in LabVIEW&amp;mdash;for example, integers that represent bitfields that you are supposed to "OR" together.  But, the Instrument Driver Import Wizard handles a lot of the conversion for you.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If it isn't obvious...  If you have a VXIpnp or IVI-C driver, you use the Import Instrument Driver Wizard, not the Generic DLL Import Wizard.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Final Caveats&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;The Instrument Driver Import Wizard used to be called the "CVI Function Panel Converter" and we shipped it with LabVIEW.  Beginning with LabVIEW 8, we made it a web download.  Some instrument vendors complained about this.  They were claiming good LabVIEW support for their C-based drivers, but telling end users to go run the tool themselves to create the LabVIEW VIs.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;My philosophy is that most end users don't need to run this tool.  &lt;em&gt;In an ideal world, the developer of the C instrument driver should be the one to run the LabVIEW Instrument Driver Import Wizard.&lt;/em&gt;  Since the output of the tool often needs some tweaking (or even fixes to the C code), I'd prefer that only one person (the driver developer) create the wrapper.  If every end user has to create the wrapper VIs, and then go hand-tweak them, it isn't very efficient.  Many end users aren't going to understand the C driver well enough to make these changes easily.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Another caveat is that these tools only run on Windows.  Fortunately, the resulting VIs can run on any LabVIEW platform (assuming you can recompile the DLL on the other platforms).  Many VXIpnp drivers can run on multiple platforms.  Interestingly, members of the IVI Foundation have told me that conformant IVI drivers can only run on Microsoft Windows.  So even though we have &lt;a href="http://zone.ni.com/devzone/cda/tut/p/id/3809"&gt;instructions for porting IVI-C drivers to Linux&lt;/a&gt;, the Linux driver may not officially be an IVI driver.  Regardless, the wrappers you create for LabVIEW should work with such a driver.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141510/using-ivi-c-and-vxipnp-drivers-in.html</link><author>noreply@blogger.com (Brian Powell)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_3ziZaf8zuQ4/RZV7Em3YHOI/AAAAAAAAAAM/EP1tgSpMlzo/s72-c/cln.png" height="72" width="72" /><feedburner:origLink>http://openmeas.blogspot.com/2006/12/using-ivi-c-and-vxipnp-drivers-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-8996019966954561620</guid><pubDate>Tue, 05 Dec 2006 18:05:00 +0000</pubDate><atom:updated>2006-12-07T09:57:49.205-06:00</atom:updated><title>LabVIEW API Design</title><description>&lt;blockquote&gt;Sorry it's been a while since my last post. I've been traveling, most recently to New Mexico and Colorado for &lt;a href="http://www.ni.com/techsym/"&gt;National Instruments Technical Symposia&lt;/a&gt;, and a little bit of photography at the &lt;a href="http://southwest.fws.gov/refuges/newmex/bosque"&gt;Bosque del Apache National Wildlife Refuge&lt;/a&gt;.&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;In my role at National Instruments, I work with many of the driver and toolkit groups that provide LabVIEW APIs for their products. We make decisions about how to best represent our products in easy to learn and easy to use ways.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We're often faced with difficult tradeoffs, and some decisions come down to a "gut feel" by those of us involved. I thought I'd share some of the thought process that goes into making a good API for LabVIEW.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;First, a little history. Many of you have attended, or at least heard of, &lt;a href="http://www.ni.com/niweek/"&gt;NIWeek&lt;/a&gt;—Thousands of users, dozens of presentations, dozens of exhibitors. Did you know that we have a similar NI-only event called "NITech"? This is where NI R&amp;amp;D sets aside three days to have NI engineers present to other other NI engineers. We learn about the latest hardware and software technologies, ongoing research ideas, and good development practices. (And just as at NIWeek, we have fun, too.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;At NITech 2001, I co-presented a session on "Why Good Hardware APIs are Different in LabVIEW, CVI, VB, and VC". Each development environment is different. Some differences are radical, such as LabVIEW's data flow approach vs. text languages that are control flow. Some are as simple as the differences in the online help systems, or the fact that LabVIEW APIs have icons in addition to function names. One conclusion of the presentation is that it's worth it to fine-tune an API for the development environment your users are going to use.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For NITech 2002, I expanded the presentation and called it "Good LabVIEW API Design". I moved it out into the open at NIWeek 2003, where I updated it and called it "Developing High Quality LabVIEW Add-ons". For NIWeek 2004, I updated it once again, and put some spin on the name—"Advanced LabVIEW Design—Usability, Reusability, and Maintainability".&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Some of the ideas from those presentations have been incorporated into either the &lt;a href="http://www.ni.com/cgi-bin/redirect.cgi?dest=infcoprod&amp;src=lvhelp&amp;openagent&amp;code=exk5vr"&gt;LabVIEW Development Guidelines&lt;/a&gt;  (available in the LabVIEW help), or the &lt;a href="http://www.ni.com/devzone/idnet/library/instrument_driver_guidelines.htm"&gt;Instrument Driver Development Guidelines&lt;/a&gt;. I don't plan to rehash every guideline here, but there are a few ideas from the presentations I'd like to cover from time to time.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;At a recent LXI meeting, I was asked whether it made sense for IVI-COM drivers to have LabVIEW VI wrappers around them. That is, instead of having users use the IVI-COM drivers as COM objects directly in LabVIEW, should he create a VI for every property and method in the driver? As with so many things, the answer is, "it depends".&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When someone asks, "should I do it this way?", you have to step back and consider the alternatives. There's not necesssarily one perfect way.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A few years ago, one of the well-known instrument vendors developed LabVIEW instrument drivers that consisted of hundreds of VIs. Basically, they had one VI per SCPI command. In a scope API, you called one VI to set coupling, and another to set vertical range, and another for vertical offset. In my book, this was pretty low-level tedious programming. It was also error-prone—some instruments, for example, have a particular order in which you need to send the commands.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've argued that users really want a higher-level instrument driver—"configure channel" or "configure vertical", not the lower-level components. Let the author of the instrument driver figure out the programming details once, instead of pushing that onto each user. Still, some vendors really like the low-level approach, since it's so powerful and so granular. I think users who want such a low-level approach can use VISA Write to send their own SCPI commands.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Let me restate this to make the tradeoffs clearer. Approach 1 is to have hundreds of simple VIs that consist mostly of VISA Write calls. The driver covers every command the instrument can handle. Approach 2 is to have only a few more complex, higher-level VIs that are commonly used. If you want something more granular, you either modify one of the existing VIs, or you create your own new VI with a VISA Write in it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I generally lean towards approach 2. The first approach is often overwhelming, and users don't know where to start and how to put the pieces together.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The IVI APIs presented some new challenges. They're more complex, and it's not as simple to insert a VISA Write in your code to tweak a specific setting. So the IVI-C APIs have a few high-level methods, and hundreds of low-level properties. When we designed the first IVI-C APIs for the various instrument classes, we tried to make it so that 80% of typical user applications could be accomplished with only the higher-level methods.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The palette menus for an IVI-C driver in LabVIEW expose the high-level functions. We often also include a single property node to make it easy to get to the rest of the API. Thus, the palettes lead you to the right starting place for the API.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The same idea could map to IVI-COM. Unfortunately, IVI-COM drivers do not always expose a high-level approach in the specific driver interface. Recall from my &lt;a href="http://openmeas.blogspot.com/2006/09/ivi-c-and-ivi-com-part-2.html"&gt;earlier post about IVI-C and IVI-COM&lt;/a&gt;, that the specific interface to an IVI-COM driver doesn't conform to any standard.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So, since I don't know anything about the structure of the API, I can't recommend creating LabVIEW wrappers around it. And because I know that most IVI-COM specific interfaces use a low-level, property-centric approach, I usually actively discourage creating wrapper VIs. The end user is going to have to explore the entire API to figure out how to put it together in an application. Fortunately, the LabVIEW Class Browser (under the View menu, and new in 8.0, I think), makes it somewhat easier to explore IVI-COM drivers.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;On the other hand, if you have a well-designed API that has easy-to-use high-level functions, it makes sense to highlight those in the palette menus and lead users to them.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;More on API design in future posts.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141511/labview-api-design.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2006/12/labview-api-design.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-8284806386124452857</guid><pubDate>Mon, 30 Oct 2006 17:18:00 +0000</pubDate><atom:updated>2006-10-30T13:24:07.684-06:00</atom:updated><title>Emulating Legacy Instruments</title><description>&lt;p&gt;This is a story of one of the projects we have in the lab.  It's an experiment and proof of concept.  At this point, we aren't committed to creating a product out of this idea.  I'm interested in hearing comments you have about it.  We presented a paper about it at AutoTestCon a couple of years ago, and I've demo'd the system to a few key customers.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We have customers who have aging test systems, often based on discontinued GPIB instrumentation.  There's often no money to update the overall system.  Changing out hardware usually implies modifying the software.  The software has often gone through some sort of validation process, so any change to the software can become extremely expensive since it would have to be revalidated.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If an instrument fails, the engineers can either hope for vast amounts of money to rebuild the entire test system with modern hardware, or they can try to repair or replace the old equipment.  eBay has become a useful tool for finding old instrumentation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So our experiment was to take a modern PXI-based measurement system, and make it pretend to be a GPIB instrument.  The PXI controller listens for commands on its built-in GPIB interface.  We wrote software that parses those commands and maps them to specific LabVIEW VIs running on the controller.  Responses are sent back out the GPIB interface.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I imposed a couple of requirements to make things interesting...&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The system had to be as generic as possible.  I didn't want to encode any traits of a DMM or Scope or Spectrum Analyzer into the system.  For this, we created an XML schema to define the commands that the system understands, as well as how those commands map to VI calls.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The system had to be extensible by end users using LabVIEW.  We aren't making turnkey instrument replacements; we're making a framework for end users.  This lets end users (or system integrators) control the fidelity of their emulation.  This might range from deriving custom measurements, to slowing down measurements to more accurately emulate legacy instrumentation.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;We came up with an editor to map commands to VIs.  With this editor, you don't have to edit the XML directly.  Here's a screenshot showing the &lt;tt&gt;CURVe?&lt;/tt&gt; command for a scope...&lt;/p&gt;&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/mapping-editor.png"&gt;&lt;br /&gt;&lt;p&gt;When the system is running, the display shows a log of all the commands and responses...  (Click to enlarge.)&lt;/p&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/emulator-log.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger2/5670/521703985686975/320/emulator-log.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;So where are we now?  The system works.  It's got some rough edges&amp;mdash;mostly things that could be easier.  As a proof of concept, our engineers did a wonderful job.  It's pretty cool to watch this system in action.  But, we're waiting for customers to tell us whether and how we should take the idea further.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The biggest piece of feedback so far is that customers wish it were more "turnkey".  It's one thing to emulate the command set of an aging instrument.  It's another to faithfully emulate measurements.  Our &lt;a href="http://www.ni.com/digitalmultimeters/"&gt;PXI-4070 6 1/2 digit DMM&lt;/a&gt; is faster and more accurate than many older box-based 6 1/2 digit DMMs.  But you usually would rather have equivalent accuracy, not more accuracy.  A faster and more accurate measurement could be a problem in some test systems.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I also want to point out that more turnkey solutions are available.  &lt;a href="http://www.winsoft.com/"&gt;WinSoft&lt;/a&gt; (a National Instruments Alliance Partner and Agilent Channel Partner) has a product called &lt;a href="http://www.winsoft.com/html/wise.html"&gt;WinSoft Instrument System Emulator (WISE)&lt;/a&gt;.  I do not have experience with their products, but I know they have years of real-world experience.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you've got thoughts on our instrument emulation project, please let me know.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141512/emulating-legacy-instruments.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2006/10/emulating-legacy-instruments.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-1174326674417585162</guid><pubDate>Wed, 25 Oct 2006 15:01:00 +0000</pubDate><atom:updated>2006-10-25T11:39:03.534-05:00</atom:updated><title>LAN Is Simple, Right?</title><description>&lt;p&gt;I was in the Boston area last week at the latest LXI Consortium meeting.  We spent some time the first day putting together our "lessons learned" from building a multi-vendor Ethernet-based test system.  To no one's surprise, we had a couple of pages of feedback.  One of the most prominent points was that the demo took three to four times the amount of effort we expected.  I haven't crunched the exact numbers, but our one team-week turned into several, including some near all-night sessions.  Our "team" consisted of experts from Agilent, Rohde &amp;amp; Schwarz, VXI Technologies, National Instruments, and others.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I'm sure those of you who build test systems for a living are laughing at us.  You would have wisely planned for the extra effort, despite (or perhaps because of) the fact that we were using LAN instead of GPIB, PXI, or some other more traditional instrumentation bus.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And you'd be right to laugh at us.  I think we were a little na&amp;iuml;ve.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Speaking of na&amp;iuml;ve, I had my own "IT issues" on my home network over the weekend.  The parallels to an LXI system are striking...&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I had a simple problem I wanted to solve:  I needed more disk space.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;As many of you know, one of my creative outlets is photography.  Before the LXI meeting, I was in Vermont for a photo workshop with &lt;a href="http://www.davidmiddletonphoto.com/"&gt;David Middleton&lt;/a&gt; and &lt;a href="http://www.barbeephoto.com/"&gt;Rod Barbee&lt;/a&gt;.  I brought home several gigabytes of digital images.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I've been making backups on DVDs, but they aren't very archival, and I need a &lt;em&gt;lot&lt;/em&gt; of them to hold my images.  I could have bought a simple internal or USB hard drive and been happy.  &lt;em&gt;But no!&lt;/em&gt;  I had to go for a RAID network attached storage device.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In theory, this is a simple solution.  The storage device is a simple device with a LAN interface.  It automatically works out the network connection.  There's a simple tool for discovering the device on the network, and it has a web server built in to let you configure various options.  Sounds like LXI, doesn't it?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You've probably surmised by now that something went wrong.  To make a long story shorter, it turns out that my new network storage device is incompatible with my network router.  Both the network router and storage device are from respected companies, but somehow they started fighting over the network.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I "solved" the problem by buying a new wireless+100-Base-T $30 router.  I looked at the gigabit ethernet routers, but they're about 5X the cost.  Yikes!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The new router has a simple "getting started" utility, and you configure it through its web server.  Sound familiar?  It only took me a few tries to get it to work wired, but I'm still struggling with the wireless security.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Ethernet is just supposed to work!  When I bought my storage device, I couldn't have conceived of all these hassles.  I didn't budget for the extra time and equipment.  Recall that I was a network administrator at an earlier point in my NI career, so I consider myself a little more savvy than most network users.  Besides, I just helped build an expensive LXI test system!  How hard can it be to add a storage device to my home network?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I'm up and hobbling right now, but I can't help thinking about how simple it would have been to plug in a simple USB device.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141513/lan-is-simple-right.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2006/10/lan-is-simple-right.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-4621162259745945262</guid><pubDate>Tue, 10 Oct 2006 20:32:00 +0000</pubDate><atom:updated>2006-10-10T15:55:21.248-05:00</atom:updated><title>A Geek Hotel</title><description>&lt;p&gt;Yeah, "Geek", not "Greek".  I must be staying in the geekiest hotel on the planet.&lt;/p&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;I have no desire to take a &lt;a href="http://www.geekcruises.com/"&gt;Geek Cruise&lt;/a&gt;, and I scored unsurprisingly low on the &lt;a href="http://www.innergeek.us/geek.html"&gt;Geek Test&lt;/a&gt;*, but I did willingly choose to stay at the &lt;a href="http://www.hotelatmit.com/"&gt;Hotel@MIT&lt;/a&gt;.  I was attracted to the hotel because of its location and promise of good internet connectivity.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I was expecting the modern decor of the lobby, and not entirely surprised by an exhibit of historical MIT robots in the lobby.  I failed to expect the bedspreads...&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/bedspread.jpg"&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now don't get me wrong.  This is a really nice hotel, close to the red line, and for those needing a deeper geek fix, the &lt;a href="http://web.mit.edu/museum/"&gt;MIT Museum&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;* As a team-building exercise (okay, it was really just a diversion from work), my part of the LabVIEW group took the geek test.  The highest score was by a woman who got points for having designed a nuclear device in college.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141514/geek-hotel.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2006/10/geek-hotel.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4273799050747704870.post-3742783417110930448</guid><pubDate>Fri, 06 Oct 2006 17:30:00 +0000</pubDate><atom:updated>2006-10-06T13:01:06.573-05:00</atom:updated><title>The Spy Among Us -- Debugging I/O</title><description>&lt;p&gt;Have you used NI Spy?  It's one of our software tools for helping you see and understand the messages sent to instruments.  It's especially useful for seeing the low-level SCPI commands sent to Serial, GPIB, or LAN instruments...&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/spy1.0.png" alt="NI-Spy Log" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It's useful for debugging, optimizing, or just learning more about instrumentation.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;NI Spy only works when using NI Software.  For example, you'll only see VISA calls if you use NI-VISA, and you'll only see GPIB calls if you use NI-488.2.  (Spy also works for NI's Modular Instrument drivers, NI-CAN, NI-DeviceNet, NI's IVI Class Drivers, and maybe some other drivers I'm forgetting.)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I want to be clear that Spy is not a hardware bus analyzer.  We sell a &lt;a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/1875"&gt;GPIB Bus Analyzer&lt;/a&gt; for really low-level debugging, but most users can get by with NI Spy.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I find NI Spy especially useful when I run into problems with an instrument driver.  If I have a LabVIEW source code driver, I can sometimes go into it and figure out what we're sending to the instrument.  But the strings we send to instruments aren't usually constants; usually some part of the string is computed.  If I want to know what we really sent to the instrument, NI Spy can show me.  Obviously, if you don't have LabVIEW source code to look through, NI Spy may be your only choice.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example, I have a C-based driver for talking to the Agilent 34401A DMM.  It works fine with this DMM.  My problems started when I used a different instrument that could pretend to be the Agilent 34401A.  There was actually a bug in the C driver that caused it to send an invalid command.  The real 34401A didn't care, but the emulation mode of this second instrument failed.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;With NI Spy, I can see the actual SCPI command sent to the instrument...&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/spy4.png"&gt;&lt;br&gt;&lt;br /&gt;Here I can see that we're sending ":CONF:VOLT AUTO,DEF".  If I go look at the official 34401A command reference, I see that the syntax is supposed to be ":CONF:VOLT DEF,DEF".  The "AUTO" is wrong.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I had the C source code to the driver, so I tried to find the mistake in the source.  It wasn't entirely obvious.  Searching for "VOLT" or "AUTO,DEF" doesn't work.  Here's the snippet of code that's wrong...&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;        /*  Configure the measurement  */&lt;br /&gt;        if (autorange == VI_ON)&lt;br /&gt;            Fmt (wrtBuf, "%s&lt;:CONF:%s AUTO,%s\r\n", funcStr[func], resolStr[resol]);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;Without NI Spy, it would have taken me even longer to solve the problem.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;By the way, I reported the problem to both the provider of the C driver, as well as to the provider of the instrument emulator.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Finally, I want to highlight a few features we added in LabVIEW 8...&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;NI Spy was ported to Linux and Mac.  (It was originally written in MFC for Windows.  The Spy team rewrote it in LabVIEW to port it to these other platforms.)&lt;br /&gt;&lt;li&gt;The logged calls make more sense for LabVIEW users.  Before LabVIEW 8, you only saw the NI-488.2 or NI-VISA C-language calls.  Here's the log from a simple write followed by a read...&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/spy2.png"&gt;&lt;br /&gt;While this gives you some insight into how LabVIEW calls NI-VISA under the hood, it's not always easy to map this to your block diagram.  Note that I hid six hundred calls to viWaitOnEvent as we waited for the I/O to complete.  So in LabVIEW 8, the output looks like this...&lt;br /&gt;&lt;img src="http://photos1.blogger.com/blogger2/5670/521703985686975/1600/spy3.png"&gt;&lt;br /&gt;This is from a slightly different driver, but you see the idea.  The function names match your diagram, and you don't have to look at the C-language calls.&lt;br /&gt;&lt;li&gt;In LabVIEW 8.2, we did the same sort of simplification for the GPIB functions in LabVIEW.  You see functions such as "GPIB Read", not "ibrda".&lt;br /&gt;&lt;/ul&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;There are a lot of other features of NI Spy that I won't go into here.  You can track instrument calls from multiple threads and processes.  You can see timestamps to help debug tricky timing situations.  It's an indispensable tool for users and developers of instrument drivers.&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://feeds.feedburner.com/~r/OpenMeasurements/~3/74141515/spy-among-us-debugging-io.html</link><author>noreply@blogger.com (Brian Powell)</author><feedburner:origLink>http://openmeas.blogspot.com/2006/10/spy-among-us-debugging-io.html</feedburner:origLink></item></channel></rss>
