<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Culverson Software-Custom DAQ Software labVIEW &#187; Tips &amp; Tricks</title>
	<atom:link href="http://culverson.com/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://culverson.com</link>
	<description>Custom Labview Data Acquisition Software Maine</description>
	<lastBuildDate>Thu, 20 May 2010 20:02:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keeping your charts up to date</title>
		<link>http://culverson.com/keeping-your-charts-up-to-date/</link>
		<comments>http://culverson.com/keeping-your-charts-up-to-date/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 14:49:00 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://culverson.com/?p=179</guid>
		<description><![CDATA[Use your chart to indicate time of day.
LabVIEW charts, out of the box, don&#8217;t lend themselves to displaying the actual time of day.  By default they give you 1024 history points and a visible scale of 0-100 so what you see is in terms of sample numbers, having no relation to actual time. This is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><strong><em>Use your chart to indicate time of day.</em></strong></p>
<p style="text-align: left;">LabVIEW charts, out of the box, don&#8217;t lend themselves to displaying the actual time of day.  By default they give you 1024 history points and a visible scale of 0-100 so what you see is in terms of sample numbers, having no relation to actual time. This is reasonable, given that the scale is adjustable in so many ways; there&#8217;s no way to guess what you want, so it&#8217;s up to you to tailor it to fit what you want.</p>
<p style="text-align: left;">Sometimes it&#8217;s useful to display the time of day on your charts, and keep that axis correctly updated as data flows in. For example:</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-183" title="ChartClock" src="http://culverson.com/site09/wp-content/uploads/2009/09/ChartClock1.PNG" alt="ChartClock" width="568" height="180" /></p>
<p style="text-align: left;">As you can see, the leading edge of the plots coincides with the current time on the clock  (see <a href="http://culverson.com/an-improved-analog-clock/" target="_blank">here</a> for how to do the clock indicator).   As data keeps coming in to this chart, the leading edge will reach the right side and the chart (and the X-axis scale) will scroll to the left, thus always matching the time of day.</p>
<p style="text-align: left;">
<p style="text-align: left;">Out of the box, a LabVIEW chart has a history of 1024 samples, and an X scale of 0-100 samples.  This scale has nothing to do with time, so if you want it to display the time, then you have to do several things to make it work.  If you have a CLEAR CHART function, triggered by a button or something, then attach this code to that action, otherwise just do it once when you start the data flowing  (Ideally, you should do this as you feed the first sample to the chart, but the few mSec difference that makes probably won&#8217;t matter).</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-181" title="ChartProperties" src="http://culverson.com/site09/wp-content/uploads/2009/09/ChartProperties.PNG" alt="ChartProperties" width="293" height="151" /></p>
<p style="text-align: left;">First, you clear the history.  That makes sure the OFFSET number is operating from an empty buffer (Time 0).  If the history buffer contains data, then the OFFSET applies to the end of it, and that&#8217;s not what you want.  The constant has to be an empty array of the same type of data as you feed to the chart (cluster of two DBLs in this case).</p>
<p style="text-align: left;">Next you set the XSCALE.OFFSET to set the OFFSET number to the current time.</p>
<p style="text-align: left;">Next you set the XSCALE.MULTIPLIER to the time (in sec) between samples that you display.</p>
<p style="text-align: left;">Next you set the XSCALE.MAXIMUM to now + the duration (in seconds) that you want the chart to show.</p>
<p style="text-align: left;">Do them in that order, or it could get confusing.  You also can set the CHART HISTORY LENGTH to match the duration / the display period.  For one minute at 2 Hz, that would be 120 samples.  You only need to do that step once &#8211; it&#8217;s a property that is not programmable.</p>
<p style="text-align: left;">
<p style="text-align: left;">Enjoy.</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://culverson.com/keeping-your-charts-up-to-date/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An Improved Analog Clock</title>
		<link>http://culverson.com/an-improved-analog-clock/</link>
		<comments>http://culverson.com/an-improved-analog-clock/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 15:58:35 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Timing]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://jimdugan.com/culverson/?p=53</guid>
		<description><![CDATA[Sometimes all that digital stuff is just too bland.
A bug undocumented feature of the original analog clock was that the markers on the scale were at intervals of 1.25 seconds, a consequence of LabVIEW preferring to use 4 intervals per major tick, when we silly humans use 5.  As a result, it looked a bit odd. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><em><strong>Sometimes all that digital stuff is just too bland.</strong></em></p>
<p>A <span style="text-decoration: line-through;">bug</span> <em>undocumented feature </em>of the <a title="original Analog Clock" href="http://culverson.com/an-analog-clock-first-version/" target="_blank">original analog clock</a> was that the markers on the scale were at intervals of 1.25 seconds, a consequence of LabVIEW preferring to use 4 intervals per major tick, when we silly humans use 5.  As a result, it looked a bit odd.  As I said then, if we’re going for an analog, then let’s go for the analog.</p>
<p>Attempts to coerce LabVIEW into making the scale the way we wanted were not successful; it has a long habit of thinking that four is a nice number and five is just an odd number, so I could not make it work.</p>
<p>So how do we improve it?  Simply disregard the built-in scale and substitute a picture.  After all, we all know where the numbers are on a clock face, if we’ve lined up the 0 and the 12 on our LabVIEW scales at the top of the circle, then all else has to fall into place.</p>
<p><a href="http://culverson.com/site09/wp-content/uploads/2009/08/Clock2Pic.png"><img class="aligncenter size-full wp-image-164" title="Clock2Pic" src="http://culverson.com/site09/wp-content/uploads/2009/08/Clock2Pic.png" alt="Clock2Pic" width="137" height="155" /></a></p>
<p>Click <a href="http://culverson.com/site09/wp-content/uploads/2009/09/Clock2llb.zip">here</a> to download the example LLB file, in LV 8.0 format. It has the same math VI as before (read the <a href="http://culverson.com/an-analog-clock-first-version/" target="_blank">previous post</a> for details), just the clock face is different.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://culverson.com/an-improved-analog-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
