<?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>VI Geek &#187; LabWindows/CVI</title>
	<atom:link href="http://www.vigeek.com/category/software-used-in-virtual-instruments/labwindowscvi/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vigeek.com</link>
	<description>My Way to Be A Virtual Instruments Geek</description>
	<lastBuildDate>Thu, 01 Jul 2010 06:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to Change Axis Name of Graph Control in LabWindows/CVI</title>
		<link>http://www.vigeek.com/2009/03/how-to-change-axis-name-of-graph-control-in-labwindowscvi.html</link>
		<comments>http://www.vigeek.com/2009/03/how-to-change-axis-name-of-graph-control-in-labwindowscvi.html#comments</comments>
		<pubDate>Tue, 24 Mar 2009 07:39:23 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LabWindows/CVI]]></category>
		<category><![CDATA[VI Software]]></category>
		<category><![CDATA[axis]]></category>
		<category><![CDATA[graph]]></category>

		<guid isPermaLink="false">http://www.vigeek.com/?p=53</guid>
		<description><![CDATA[We can use the SetCtrlAttribute function to change an Axis name programmatically in LabWindows/CVI. Just set the ATTR_XNAME or ATTR_YNAME attribute to any name you’d like to use in this function. For example, change the top X-Axis name of a graph, we can use the following code. // Make the top x-axis the active one [...]


Related posts:<ol><li><a href='http://www.vigeek.com/2010/01/the-difference-between-chart-and-graph-in-labview.html' rel='bookmark' title='Permanent Link: The Difference Between Chart and Graph in LabVIEW'>The Difference Between Chart and Graph in LabVIEW</a> <small>We can use chart and graph to display our acquired...</small></li>
<li><a href='http://www.vigeek.com/2010/02/how-to-create-a-programmatically-changed-text-label-in-labview.html' rel='bookmark' title='Permanent Link: How to Create a Programmatically Changed Text Label In LabVIEW'>How to Create a Programmatically Changed Text Label In LabVIEW</a> <small>In LabWindows/CVI, we can create a free label text control...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We can use the <em>SetCtrlAttribute</em> function to change an Axis name programmatically in LabWindows/CVI. Just set the ATTR_XNAME or ATTR_YNAME attribute to any name you’d like to use in this function.</p>
<p>For example, change the top X-Axis name of a graph, we can use the following code.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Make the top x-axis the active one</span>
SetCtrlAttribute <span style="color: #009900;">&#40;</span>panel<span style="color: #339933;">,</span> PANEL_GRAPH<span style="color: #339933;">,</span> ATTR_ACTIVE_XAXIS<span style="color: #339933;">,</span> VAL_TOP_XAXIS<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
<span style="color: #666666; font-style: italic;">// Set the name</span>
SetCtrlAttribute <span style="color: #009900;">&#40;</span>panel<span style="color: #339933;">,</span> PANEL_GRAPH<span style="color: #339933;">,</span> ATTR_XNAME<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Axis Changed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</blockquote>


<p>Related posts:<ol><li><a href='http://www.vigeek.com/2010/01/the-difference-between-chart-and-graph-in-labview.html' rel='bookmark' title='Permanent Link: The Difference Between Chart and Graph in LabVIEW'>The Difference Between Chart and Graph in LabVIEW</a> <small>We can use chart and graph to display our acquired...</small></li>
<li><a href='http://www.vigeek.com/2010/02/how-to-create-a-programmatically-changed-text-label-in-labview.html' rel='bookmark' title='Permanent Link: How to Create a Programmatically Changed Text Label In LabVIEW'>How to Create a Programmatically Changed Text Label In LabVIEW</a> <small>In LabWindows/CVI, we can create a free label text control...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vigeek.com/2009/03/how-to-change-axis-name-of-graph-control-in-labwindowscvi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better Way to Program Controls of the Same Kind in LabWindows/CVI</title>
		<link>http://www.vigeek.com/2008/04/a-better-way-to-program-controls-of-the-same-kind-in-labwindowscvi.html</link>
		<comments>http://www.vigeek.com/2008/04/a-better-way-to-program-controls-of-the-same-kind-in-labwindowscvi.html#comments</comments>
		<pubDate>Sat, 05 Apr 2008 16:46:08 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LabWindows/CVI]]></category>
		<category><![CDATA[callback]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[CVI]]></category>
		<category><![CDATA[LabWIndows]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.vigeek.com/?p=16</guid>
		<description><![CDATA[Usually, there are only one or two controls of the same kind in a normal VI(Virtual Instruments, computer based measurements and automation systems) application. And, we can write the callback functions of these controls one by one in LabWindows/CVI. But, if there are more than four in number of the same kind of control, it&#8217;ll [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Usually, there are only one or two controls of the same kind in a normal VI(Virtual Instruments, computer based measurements and automation systems) application. And, we can write the callback functions of these controls one by one in LabWindows/CVI. But, if there are more than four in number of the same kind of control, it&#8217;ll be a hard work to write the callback functions one by one for them.</p>
<p>If the controls have similar functions, it&#8217;s a better idea to make them use the same callback function. It save a lot of time and make the program short and simple. Every control on the UI(User Interface) has a unique reference ID, we could build an array of reference IDs to store the ID information of every control on UI. And, in the callback function, the parameter &#8220;control&#8221; can be used to identify which control is functioning. And a loop in the callback function can be used to find out the right execution code and run it.</p>
<p>Code can be like this:<br />
<span id="more-16"></span></p>
<p>[sourcecode language='c']<br />
int iControlIDs[n];   //The definition of the ID array<br />
…….<br />
CallbackFunction(……)            //The callback function<br />
    {<br />
    for(i=0; i<n; i=i+1)<br />
        {<br />
        if(control == iControlIDs[i])<br />
              {<br />
              …… //The execution code of the control<br />
              }<br />
        }<br />
    }<br />
[/sourcecode]</p>
<p>It will make the code short and simple. And will save a lot time from writing callback function code to each control separately.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vigeek.com/2008/04/a-better-way-to-program-controls-of-the-same-kind-in-labwindowscvi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
