<?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 Re: Sort data with display each move in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125310#M897635</link>
    <description>&lt;P&gt;I don't undestand the output .. and number 65535 ( i know is maxim in this format of number ) &amp;nbsp;... i don' t adapt then ... i don't know how ?&lt;/P&gt;</description>
    <pubDate>Sun, 26 Apr 2015 06:51:06 GMT</pubDate>
    <dc:creator>bledyuc</dc:creator>
    <dc:date>2015-04-26T06:51:06Z</dc:date>
    <item>
      <title>Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125149#M897538</link>
      <description>&lt;P&gt;Hy,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need a VI witch sort data with 2 aray .&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/f9efc58af29a1bb5d83358be82054da82f49f4c2/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632343969383038343439443530453731303832352f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="2 array.JPG" title="2 array.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this image i have first aray and after sort, first column is position of cd in rack and second column is number of cd.&lt;/P&gt;
&lt;P&gt;For sort i use position 6 in rack, this position is free.&lt;/P&gt;
&lt;P&gt;For this situation array such as :&lt;/P&gt;
&lt;P&gt;1 --- 6&lt;/P&gt;
&lt;P&gt;3 --- 1&lt;/P&gt;
&lt;P&gt;5 --- 3&lt;/P&gt;
&lt;P&gt;4 --- 5&lt;/P&gt;
&lt;P&gt;2 --- 4&lt;/P&gt;
&lt;P&gt;6 --- 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the moves you made ... i need a VI&amp;nbsp;which makes it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EX:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/4b482e9247138fc8d9eed912b2f8159d31c654e7/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632353069463642303441383036344639383638302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="exemple.JPG" title="exemple.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a nice day .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 08:49:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125149#M897538</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-25T08:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125163#M897546</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;I need a VI witch sort data with 2 aray&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;...so, &lt;EM&gt;&lt;STRONG&gt;write&lt;/STRONG&gt;&lt;/EM&gt; one!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is obviously homework (you don't really need a computer program to tell you how to sort your CD rack, do you?). Which means you are trying to learn programming. Which means you should try and learn programming.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When you have a specific question about LabVIEW, post your code and describe what trouble you are having and someone will probably try to help. But no one is going to hand your homework assignment to you on a plate. Man up and get to work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 10:22:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125163#M897546</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-25T10:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125247#M897594</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;bledyuc wrote:
&lt;P&gt;I need a VI witch sort data with 2 aray .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(Picture of two 2D arrays with two columns and five rows)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this image i have first aray and after sort, first column is position of cd in rack and second column is number of cd.&lt;/P&gt;
&lt;P&gt;For sort i use position 6 in rack, this position is free.&lt;/P&gt;
&lt;P&gt;For this situation array such as :&lt;/P&gt;
&lt;P&gt;1 --- 6&lt;/P&gt;
&lt;P&gt;3 --- 1&lt;/P&gt;
&lt;P&gt;5 --- 3&lt;/P&gt;
&lt;P&gt;4 --- 5&lt;/P&gt;
&lt;P&gt;2 --- 4&lt;/P&gt;
&lt;P&gt;6 --- 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the moves you made ... i need a VI&amp;nbsp;which makes it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EX:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(picture of a 2D array with four elements)&lt;/EM&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OK, so are you just looking to implement sorting a 2D array by a certain column or are you trying to implement a specific (seemingly quite inefficient) sorting algorithm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, your question needs to be much clearer!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the first picture you show two different 2D arrays. What's the significance of the first column? What is the sigificance of the right and left array? Is the left array a typical input and the right array a corresponding result? The data in the first column seems redundant. All you need is the second column as a 1D array where the value of the original first colum corresponds to the array index+1. Right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems all you do is sort the second column, leaving the first column untouched. A typical and efficient sort algorithm operates in place, so why would you want to use an extra row for temporary storage?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the end, you show a picture of a 2x2 2D array with four elements. Does it have anything to do with the question or answer? Please explain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, try to solve it as much as possible and if you get stuck, attach yor VI attempt. Make sure the controls contain typical inputs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 17:53:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125247#M897594</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-04-25T17:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125261#M897597</link>
      <description>&lt;P&gt;Ok, i try to be more explicit .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have robot&amp;nbsp;controlled through a serial port, i make a VI that we control. First part of aplication, my robot takes CD ( have a code QR with a number ) a rack a move then to a camera,&amp;nbsp;that reads the code and after that robot put the CD in rack in same position. After read all cd i have this array :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/b7bf1d5d572a019a35f657b566ec3d13c95e252b/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632373069323132314638363830453638373746452f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="position with read.JPG" title="position with read.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to know&amp;nbsp;which are movements that have to make the robot for sort all cd&amp;nbsp;depending on numeber of QR code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ex: Move cd13 on position 1 to position 6 ( use a other position for sorting ) ( position 1 is free )&lt;/P&gt;
&lt;P&gt;Move cd12 on position 3 to position 1 ( after that CD12 is in corect positon ) ( position 3 is free )&lt;/P&gt;
&lt;P&gt;Move cd 15 on positon 5 to position 3 ( after that CD15 is in corect positon ) ( position 5 is free )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Move cd 32&amp;nbsp;on positon 4&amp;nbsp;to position 5&amp;nbsp;( after that CD32 is in corect positon ) ( position 4&amp;nbsp;is free )&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Move cd 23&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;on positon 2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to position 4&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;( after that CD23&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is in corect positon ) ( position 2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is free )&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Move cd 13&lt;SPAN&gt;&amp;nbsp;on positon 6&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to position 2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;( after that CD13&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is in corect positon )&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that my array is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/8e10ea1eccac32036ce3be9460961e5dfdcaf99d/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632373269423533364431443036314242333937422f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="ddd.JPG" title="ddd.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i try then :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/1ec399617b2784f339689aae95ccc0c4d12ed2e3/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632373169453338353339323845464445414235302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="exem.JPG" title="exem.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 18:59:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125261#M897597</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-25T18:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125270#M897603</link>
      <description>&lt;P&gt;So, how should the desired output look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(sorry, your code image is too scrambled and truncated to provide any useful information. Why don't you attach the actual VI instead?)&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 19:49:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125270#M897603</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-04-25T19:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125272#M897605</link>
      <description>&lt;P&gt;EXemple of output:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/4b482e9247138fc8d9eed912b2f8159d31c654e7/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632353069463642303441383036344639383638302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="exemple.JPG" title="exemple.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First line :&amp;nbsp;Move CD on position 3 to 6&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second line : Move CD on position 5 to 3&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 19:54:50 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125272#M897605</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-25T19:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125293#M897622</link>
      <description>&lt;P&gt;So have you worked out the algorithm you need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You need to get your desired order (by sorting your initial order) so you know what needs moving.&lt;/P&gt;
&lt;P&gt;2. Find the first cd that is out of place and move it to the empty slot.&lt;/P&gt;
&lt;P&gt;3. Determine which cd belongs in the slot just&amp;nbsp;vacated by looking it up in your desired array.&lt;/P&gt;
&lt;P&gt;4. Find that cd in your actual array (search for it)&lt;/P&gt;
&lt;P&gt;5. Move the cd into the vacant slot where it belongs.&lt;/P&gt;
&lt;P&gt;6. Repeat from 3 until the actual matches the desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a very quick knock up of that. Note I have used a simple max value to represent the empty slot, and this is certainly not the most efficient sort algorithm anyone has ever come up with, but for a few cds it will probably do. The output array lists which cd to move from slot to slot. Slot indexes are zero based.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you adapt this to your application? (I gave up trying to understand your code.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/84a9a1ac2bbbb4fffb58de57b6f0fba51530a925/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632373669383333363033344530424336394638342f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="CD Sort.png" title="CD Sort.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 22:53:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125293#M897622</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-25T22:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125310#M897635</link>
      <description>&lt;P&gt;I don't undestand the output .. and number 65535 ( i know is maxim in this format of number ) &amp;nbsp;... i don' t adapt then ... i don't know how ?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 06:51:06 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125310#M897635</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-26T06:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125317#M897640</link>
      <description>&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/c5a8f6570d0a35662e6dc2d07c7e721a3c0a1209/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632373969344633313246344535304443373446462f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="CD Sort fp.png" title="CD Sort fp.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start Order are the CD numbers in their original order. It is only a 1D array because there was no point (for me) including another column with the index. We already know the index!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired Order is where each cd should end up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 'moves' array lists which cd to move from which slot to which slot - in this case:&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;move cd 13 from slot 0 to slot 5,&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;then move cd 12 from slot 2 to slot 0,&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;then move cd 14 from slot 4 to slot 2, ... etc.&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finished Order is a check on where everything ended up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because in LabVIEW you can't have an empty array element, I needed a way to represent the empty slot. I used 65535 simply on the assumption that there would be no cd with that number. I could have used 0 or -1 (which would have been cleaner) but then it would have sorted to the beginning of the list which I did not want and couldn't be bothered coding for that special case. 65535 was convenient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output format ('moves' array) is a bit different to your original specification, but its really just a case of which figures you take out of the loop and add to the array. I did it like this because it made more sense to me and seemed more intuitive. You can take the figures and format the output however you like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 07:31:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125317#M897640</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-26T07:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125322#M897643</link>
      <description>&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/f8ed14e699021d4bde949f5f13cd79c1d61c805f/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632383169444643333132423239313945344445312f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="notwork.JPG" title="notwork.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;why don't work ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 07:56:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125322#M897643</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-26T07:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125329#M897648</link>
      <description>&lt;P&gt;Hint - look at the broken wire in the while loop. Hover mouse over it for more information. If you don't understand why you get this error, look at where it is coming from - the '=' node. Look up the help on that - it can be configured in different ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What data types are going into the '=' node? (hover mouse over wires to see)&lt;/P&gt;
&lt;P&gt;What data type have you got coming out?&lt;/P&gt;
&lt;P&gt;What data type do you need coming out?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Speaking of data types - your 65536 has coercion dots (probably - hard to see) - fix that.&lt;/P&gt;
&lt;P&gt;Speaking of hard to see - tidy your diagram up, reduce its size, easier to read for you and for me if you post it.&lt;/P&gt;
&lt;P&gt;Speaking of diagrams -&amp;nbsp;&lt;A href="http://www.ni.com/tutorial/9330/en/" target="_blank"&gt;Use VI Snippet to Store and Share Reusable Code Sections&lt;/A&gt;&amp;nbsp;(you can do this with the code I pasted earlier - just right click the image and 'save as' then drag the file into a blank block diagram.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 08:51:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125329#M897648</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-26T08:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125333#M897651</link>
      <description>&lt;P&gt;LV 13&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 10:39:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125333#M897651</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-26T10:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125340#M897652</link>
      <description>&lt;P&gt;For 3 diferit number work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/f4a9e4e6e12302ac9729dfbeebe70aae10c7b79f/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632383369313043343141444334334335323931312f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="3 numere merge.JPG" title="3 numere merge.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more number don't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/990c772dd606d7ab306b4de9302e2109fc25c6a9/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632383469453246363530353933323043463341392f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="nu merge.JPG" title="nu merge.JPG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is VI :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/71fc0788ee1819c80b749e7961bef36f49233095/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363632383669443642394641303835433645414432412f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="test.png" title="test.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 11:48:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125340#M897652</guid>
      <dc:creator>bledyuc</dc:creator>
      <dc:date>2015-04-26T11:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125363#M897659</link>
      <description>&lt;P&gt;My guess is that there is a flaw in the logic.&amp;nbsp; When it gets to a CD already in the position where it is supposed to be, it doesn't know how to skip over it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More specifically, when the 2nd CD is in the first slot, and it gets swapped into the 2nd because that is where the 1st CD actually is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm guessing something about the logic happening in that very first swap before the while loop starts is failing it.&amp;nbsp; I think all swap logic belongs in the while loop including the first swap.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 16:11:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125363#M897659</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2015-04-26T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data with display each move</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125669#M897773</link>
      <description>&lt;P&gt;Yes - this was a very quick knock-together with minimal testing - defintiely flawed!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't run the code at the moment, but if you just work through it manually you'll see that, with your values, it does the first swap ('9' from 0 to 5 - fine), then enters the loop.&lt;/P&gt;
&lt;P&gt;First iteration - '3' from 1 to 0&lt;/P&gt;
&lt;P&gt;2nd iteration - '9' from 5 to 1&lt;/P&gt;
&lt;P&gt;At this point it hangs up. The next thing it does is look to see what should be in slot 5 (empty) and slot 5 is now empty, so nothing gets moved, and it just goes round and round moving nothing until... There needs to be a check in the loop for this condition and go back and find the next one that needs moving (could use the initial method of finding the first one out of place to find the next that needs moving).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you add that? Or maybe the whole algorithm needs a minor re-think.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:47:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Sort-data-with-display-each-move/m-p/3125669#M897773</guid>
      <dc:creator>Stuart.Parkinson</dc:creator>
      <dc:date>2015-04-27T11:47:27Z</dc:date>
    </item>
  </channel>
</rss>

