<?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: Display colour data on a rectangular column in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143653#M904792</link>
    <description>&lt;P&gt;Yes, you should read the valid chunks terminated by the termination character. That ensures that you don't get framing errors. For example if you just check the "bytes at port" while it is in the middle of receiving, you might occasionally only get partial data and trying to parse it would give you garbage. I never do serial, so others with more experience should chime in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warning: my code above was just patched together very quickly, so there are probably bugs. For example I just noticed that you need to insert&amp;nbsp;a "+1" after the iteration terminal in the very small FOR loop of the V case.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2015 23:45:09 GMT</pubDate>
    <dc:creator>altenbach</dc:creator>
    <dc:date>2015-06-01T23:45:09Z</dc:date>
    <item>
      <title>Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3141795#M904046</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently using a RGB sensor to detect paint on perspex. The RGB sensor is mounted on a robotic arm and detection is carrying out a vertical motion using the robotic arm. Every motion covers a rectangular area 110mmx70mm. The value of red paint has been calibrated and is given out as a percentage. For example, no red paint is equivalent to 0%, pink is equivalent to 50% and completely red is equivalent to 100%. The value depends on the concentration of the red paint on the perspex. Each reading taken by the RGB sensor covers a rectangle of 10mmx10mm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to achieve in LabVIEW is to mimic the paint on a detected vertical section of the perspex in a similar rectangular box in the LabVIEW interface. I am able to send data serially using a Bluetooth module to LabVIEW, but I do not know how to go about in using this data to achieve my required goal. Can someone please guide me in carrying this out please? Any reference to LabVIEW examples will also be great.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 20:15:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3141795#M904046</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-05-28T20:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3141811#M904058</link>
      <description>&lt;P&gt;Assuming the data covers a rectangular grid, easiest would be an intensity graph where the data is a 11x7 2D array of percentages. Set the Z scale from 0 to 100 and define a sutable color ramp.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 20:24:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3141811#M904058</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-05-28T20:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142290#M904247</link>
      <description>&lt;P&gt;Yes it is a rectangular grid. I will probably look into then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not really great in LabVIEW, so can you please provide me with some examples that I can look into please? It will be really helpful. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 14:50:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142290#M904247</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-05-29T14:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142387#M904280</link>
      <description>&lt;P&gt;Do you get all data at once or do you want to update the display whenever a new grid point has been measured?&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 16:58:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142387#M904280</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-05-29T16:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142408#M904291</link>
      <description>&lt;P&gt;The grid will be updated once the data comes in. And as the RGB sensor data reading data column by column, data will be coming in at different times. So, the intensity graph will have to be updated when that happens&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 17:27:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142408#M904291</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-05-29T17:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142416#M904295</link>
      <description>&lt;P&gt;Easiest would be to keep an initialized 2D array of the right size in shift registers and update values as they come in. Here's a quick example.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 17:41:06 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142416#M904295</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-05-29T17:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142501#M904340</link>
      <description>&lt;P&gt;Thanks mate. This is definitely something I was looking for. I just need to link it to the stream of serial data coming from RGB sensor now and hopefully that should work. Will let you know if I face any further problems in the future. Cheers.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 19:47:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142501#M904340</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-05-29T19:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142877#M904528</link>
      <description>&lt;P&gt;I am now currently able to read data from the RGB sensor and extract the necessary data onto the intensity graph. But the problem I am facing is that I cannot retain the data. I can only see one reading at a time on the graph. A new reading gets replaced by the current one. Ideally, I wanted to create the complete grid of data and retain all of it. What do I need to modify in order to achieve this? I have attached my VI so that you can understand what I am trying to achieve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/s/woktmvgq3o85ken/Serial_Test_Vald.vi?dl=0" target="_blank"&gt;https://www.dropbox.com/s/woktmvgq3o85ken/Serial_Test_Vald.vi?dl=0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 00:40:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142877#M904528</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-01T00:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142898#M904534</link>
      <description>&lt;P&gt;(Please attach the VI directly here. DropBox asks me to sign in so I cannot look at it.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what you are saying, it seems you simply forgot to add a shift register.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 02:24:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3142898#M904534</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-01T02:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143110#M904591</link>
      <description>&lt;P&gt;Here is the attached VI. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 11:41:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143110#M904591</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-01T11:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143375#M904678</link>
      <description>&lt;P&gt;You are constantly initializing the shift register.&lt;/P&gt;
&lt;P&gt;Move the outer shift register to the outer while loop and initialize it from the outside when the program starts. Remove&amp;nbsp;the N=1 FOR loop. It serves no purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how many times do you think you need to take the same string subset? You can get the first character once and wire it to a case structure with as many cases as you have possible outcomes. Also create a default case that does nothing or generates an error. Your entire code would shrink to the size of a postcard. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 15:26:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143375#M904678</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-01T15:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143416#M904695</link>
      <description>&lt;P&gt;Thanks. I will give that a go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And haha didn't know that can be done with the case structure. Well I am a LabVIEW noob after all haha. Cheers for that lesson.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://ni.lithium.com/i/smilies/16x16_smiley-happy.gif" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 16:09:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143416#M904695</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-01T16:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143481#M904719</link>
      <description>&lt;P&gt;Here's a quick mockup on what I had in mind. Also note that you don't need a seperate indicator for charts. Simply right-click the chart and select "visible items...digital display". You should wire your property node error out to the outer while loop to make sure the loop does not start until all charts are reset.&lt;/P&gt;
&lt;P&gt;Note that there is no more duplicate code. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; Modify as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The use of "bytes at port" is typically not recommended. Doesn't the instrument send a termination character, for example?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 18:11:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143481#M904719</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-01T18:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143645#M904789</link>
      <description>&lt;P&gt;Just checked the modifications. Haha you weren't joking when you made the postcard reference. Thanks for sorting that out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, it used to carriage return ('13') as a termination character, but I took it off when I was doing this test. If I included the termination character, will it become easier for me to extract the data? Also does using bytes at port create any issue?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 23:21:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143645#M904789</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-01T23:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143653#M904792</link>
      <description>&lt;P&gt;Yes, you should read the valid chunks terminated by the termination character. That ensures that you don't get framing errors. For example if you just check the "bytes at port" while it is in the middle of receiving, you might occasionally only get partial data and trying to parse it would give you garbage. I never do serial, so others with more experience should chime in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warning: my code above was just patched together very quickly, so there are probably bugs. For example I just noticed that you need to insert&amp;nbsp;a "+1" after the iteration terminal in the very small FOR loop of the V case.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 23:45:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143653#M904792</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-01T23:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143663#M904797</link>
      <description>&lt;P&gt;Okay I understand that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And add one to the number of iterations then? I have attached the VI.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 00:11:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143663#M904797</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-02T00:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143671#M904802</link>
      <description>&lt;P&gt;No, the number of iterations is determined by the array with 3 elements and should remain at 3.&lt;BR /&gt;(Posting by phone, will look at the code later)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 00:48:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143671#M904802</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-02T00:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143689#M904812</link>
      <description>&lt;P&gt;Yes, that's almost what I meant. Of course simpler would be to use the &lt;A href="http://zone.ni.com/reference/en-XX/help/371361L-01/glang/increment/" target="_blank"&gt;increment function&lt;/A&gt;. Less clutter, &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 02:06:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143689#M904812</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2015-06-02T02:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143697#M904814</link>
      <description>&lt;P&gt;Haha I always tend to take the tedious way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I have attached my final design. Looks a bit messy as I have added all the parts in. This also includes a simulation of my robotic arm on which the RGB sensor is mounted. Any suggestions on how I can modify this program and make it more efficient and less please?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 02:54:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143697#M904814</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-02T02:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Display colour data on a rectangular column</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143967#M904931</link>
      <description>&lt;P&gt;I have attached my latest labview VI.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have put a set of boolean switches inside a while loop. Each of them write different characters to the serial port. Preferably I want to do it once, even though it is in a while loop. Is latching after press the best way to set up the boolean switches for this purpose?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I have another while loop continuously running in search for any incoming data from the active serial ports and also have a 3D robotic arm simulation model running at the same thime which moves according to the joint position feedback from some smart servos that comes in through one of the serial ports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loads of things are going on in this VI. I was wondering is there a way of simplyfying it, so that it might be easier for me to debug it, if necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 14:03:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Display-colour-data-on-a-rectangular-column/m-p/3143967#M904931</guid>
      <dc:creator>navidahmeduom</dc:creator>
      <dc:date>2015-06-02T14:03:21Z</dc:date>
    </item>
  </channel>
</rss>

