<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic create a ring with many items in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102971#M487501</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of enum in a text base program it goes like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable 1 = 13&lt;/P&gt;&lt;P&gt;variable 2 = 234&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;variable 100 = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable names are very long.&amp;nbsp; I thought if I want to do something similar, I would have to create a ring with all these 100 values.&amp;nbsp; My questions are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Is the ring&amp;nbsp;the best approach to associate a name with a value?&lt;/P&gt;&lt;P&gt;2. Is there a quick way to add so many items to a ring?&lt;/P&gt;&lt;P&gt;3. If the variable names are so&amp;nbsp;long, what are the ways that I can use to save real estate while preserving clarity?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yik&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2010 22:22:24 GMT</pubDate>
    <dc:creator>jyang72211</dc:creator>
    <dc:date>2010-03-31T22:22:24Z</dc:date>
    <item>
      <title>create a ring with many items</title>
      <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102971#M487501</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of enum in a text base program it goes like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable 1 = 13&lt;/P&gt;&lt;P&gt;variable 2 = 234&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;variable 100 = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable names are very long.&amp;nbsp; I thought if I want to do something similar, I would have to create a ring with all these 100 values.&amp;nbsp; My questions are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Is the ring&amp;nbsp;the best approach to associate a name with a value?&lt;/P&gt;&lt;P&gt;2. Is there a quick way to add so many items to a ring?&lt;/P&gt;&lt;P&gt;3. If the variable names are so&amp;nbsp;long, what are the ways that I can use to save real estate while preserving clarity?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yik&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2010 22:22:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102971#M487501</guid>
      <dc:creator>jyang72211</dc:creator>
      <dc:date>2010-03-31T22:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: create a ring with many items</title>
      <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102976#M487503</link>
      <description>&lt;P&gt;1. A ring is a reasonable approach. How is this being used in the program? Are these "variables" more like #define statements in C? If so you could type-def the ring, but you need to be aware that if you update the value then instances of the typedef will not update automatically, &lt;A href="http://forums.ni.com/ni/board/message?board.id=170&amp;amp;view=by_date_ascending&amp;amp;message.id=422716#M422716" target="_self"&gt;even if it's a strict type def&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Define "quick". The ring items are written using the Strings[] property or the Strings[] And Values[] property. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Kind of hard to answer this, as it depends on what the variable names are, and what they represent.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2010 22:36:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102976#M487503</guid>
      <dc:creator>smercurio_fc</dc:creator>
      <dc:date>2010-03-31T22:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: create a ring with many items</title>
      <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102985#M487506</link>
      <description>&lt;DIV class="content-column "&gt;&lt;DIV class="clearfix"&gt;&lt;DIV class="wrapper-hide-overflow message-body justify"&gt;&lt;P&gt;1. A ring is a reasonable approach. How is this being used in the program? Are these "variables" more like #define statements in C? If so you could type-def the ring, but you need to be aware that if you update the value then instances of the typedef will not update automatically, &lt;A href="http://forums.ni.com/ni/board/message?board.id=170&amp;amp;view=by_date_ascending&amp;amp;message.id=422716#M422716" target="_self"&gt;&lt;FONT color="#3366cc"&gt;even if it's a strict type def&lt;/FONT&gt;&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I didn't know that.&amp;nbsp; So I need to change the value, change the number represtation and change it back?&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Define "quick". The ring items are written using the Strings[] property or the Strings[] And Values[] property. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;so I should write a quick vi that populate the ring?&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;Yik</description>
      <pubDate>Wed, 31 Mar 2010 22:56:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1102985#M487506</guid>
      <dc:creator>jyang72211</dc:creator>
      <dc:date>2010-03-31T22:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: create a ring with many items</title>
      <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1103040#M487523</link>
      <description>&lt;P&gt;One thing not mentioned is that ring has to have UNIQUE values.&amp;nbsp; If two of your variables have the same value, a ring would not work.&amp;nbsp; I hate working with rings for the inability for typedefs to properly update.&amp;nbsp; I have in the past used an enum and had a VI which just got the value based on the enum.&amp;nbsp; LabVIEW doesn't allow enums to skip values, nor be negative, but it does update properly when using a typedef.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can write a quick VI to get the values and strings from a file.&amp;nbsp; For enums, it is a little more complicated, as they cannot be updated while in run mode.&amp;nbsp; TO make things easier, I usually start with a ring, get the strings set and then replace it with an enum, and the string values will stick. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using an enum or ring is not very space conscious, so you're pretty much stuck in that regard.&amp;nbsp; If you use the enum/VI lookup solution, you can make the icon for the VI pretty small so it doesn't take up too much space. &lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2010 02:05:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1103040#M487523</guid>
      <dc:creator>Matthew_Kelton</dc:creator>
      <dc:date>2010-04-01T02:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: create a ring with many items</title>
      <link>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1103044#M487526</link>
      <description>&lt;P&gt;I have had a big ring get unwieldy before and so what I did was to use a constant array for the values and an enum for the indices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so anywhere I wanted one of the values, I would wire the array to an Index array and an enum constant to the array index. &amp;nbsp;Then you can simplify this by putting it in a subvi, so the constant is in one place and you can create the enum constant by right clicking on the subvi's input terminal. &amp;nbsp;Don't forget to type-def the enum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2010 02:19:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/create-a-ring-with-many-items/m-p/1103044#M487526</guid>
      <dc:creator>blawson</dc:creator>
      <dc:date>2010-04-01T02:19:31Z</dc:date>
    </item>
  </channel>
</rss>

