<?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: Simultaneous Data Streams Through VISA in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791485#M1069596</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/602433"&gt;@CTumilson&lt;/a&gt;&amp;nbsp;wrote: &lt;BR /&gt;
&lt;P&gt;however that gives me an error message (Error -1073807339).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That tells me something is configured wrong and/or we are not properly understanding the instrument's protocol.&amp;nbsp; What is the instrument you are trying to communicate with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/602433"&gt;@CTumilson&lt;/a&gt;&amp;nbsp;wrote: &lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Apologies again. I realize this is probably quite simple stuff, but with my inexperience any help is greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ok, just stop what you are doing and take time to learn the basics.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/getting-started/labview-basics/" target="_blank"&gt;Learn LabVIEW Basics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/academic/students/learn/" target="_blank"&gt;Training for Students&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.learnni.com/" target="_blank"&gt;NI Learning Center&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sine.ni.com/myni/self-paced-training/app/main.xhtml" target="_blank"&gt;Online Training (SSP Required)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/training/labview/" target="_blank"&gt;Find LabVIEW Courses&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 14:02:45 GMT</pubDate>
    <dc:creator>crossrulz</dc:creator>
    <dc:date>2018-05-10T14:02:45Z</dc:date>
    <item>
      <title>Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791021#M1069433</link>
      <description>&lt;P&gt;Hello. I've had zero experience with LabVIEW before trying to create this block diagram so apologies if what I'm asking is relatively simple. It would also help if answers where in a relatively simple&amp;nbsp;format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a&amp;nbsp;LabVIEW program which will retrieve pressure and temperature from a pressure gauge which is connected via a 9 pin RS232 cable. Eventually I'll be connecting it up to an arduino for a safety interlock, but at the minute I'm just trying to read the data. I've been able to read both temperature and pressure separately&amp;nbsp;by using the command function and case structures (see photo below). Is there any way to monitor both simultaneously, given that they're both coming in through the same visa block?&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Block Diagram for Pressure" style="width: 999px;"&gt;&lt;img src="https://forums.ni.com/t5/image/serverpage/image-id/227803i7AB8DD17507BA490/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pressure Gauge Controller Photo.jpg" alt="Block Diagram for Pressure" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Block Diagram for Pressure&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 13:21:48 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791021#M1069433</guid>
      <dc:creator>CTumilson</dc:creator>
      <dc:date>2018-05-09T13:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791027#M1069435</link>
      <description>&lt;P&gt;Hi CT,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;Is there any way to monitor both simultaneously, given that they're both coming in through the same visa block?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Yes, sure!&lt;/P&gt;
&lt;P&gt;- use a loop in your VI, put the init stuff before the loop and close the port once after the loop&lt;/P&gt;
&lt;P&gt;- get rid of BytesAtPort, you don't need it for your communication&lt;/P&gt;
&lt;P&gt;- send the command to read pressure and read the answer&lt;/P&gt;
&lt;P&gt;- then send the command to read temperature and read the answer&lt;/P&gt;
&lt;P&gt;- repeat the last two steps as long as you like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Btw. with your blockdiagram it would be nice to use the AutoCleanup button…&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 13:28:31 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791027#M1069435</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2018-05-09T13:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791145#M1069482</link>
      <description>&lt;P&gt;To elaborate on a point GerdW already made.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DO NOT USE THE BYTES AT PORT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (I need to turn that into a maco since I have been saying that so much).&lt;/P&gt;
&lt;P&gt;The deal with the Bytes At Port is that you do not need it.&amp;nbsp; It is doing nothing but causing weird race conditions.&amp;nbsp; It looks like your instrument is using an ASCII format and ends with a Carriage Return (0xA, \n).&amp;nbsp; That ending character is called a Termination Character.&amp;nbsp; So when configured correctly (which you do by default), the VISA Read will stop reading when it reads that termination character or it reads the number of bytes you told it.&amp;nbsp; So you can get rid of that 200ms wait and the Bytes At Port and just tell the VISA Read to read more bytes than you ever expect in a message.&amp;nbsp; 50 should work just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion would be to make a VI that just does that query of the instrument (VISA Write followed by the VISA Read) with an input for the command and an output with the data.&amp;nbsp; Then you can reuse that bit of code.&amp;nbsp; You can chain two of those VIs to be in series (use the error cluster to serialize), one for each query you are performing.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 16:44:38 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791145#M1069482</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2018-05-09T16:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791478#M1069593</link>
      <description>&lt;P&gt;Hi Both,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help. Unfortunately I've extremely little experience with LabVIEW, so your answers don't make a great amount of sense to me.To get this far I've basically been copying a block diagram given to me by someone who has used similar equipment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly I've tried removing the bytes at port and replacing it with the 50 as per your suggestion (see below); however that gives me an error message (Error -1073807339). Is this what you meant&amp;nbsp;for me to do, or have I just implemented it wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly and more importantly when you suggested&amp;nbsp;&lt;SPAN&gt;use a loop in your VI, &lt;EM&gt;&lt;STRONG&gt;put the init stuff before the loop and close the port once after the loop&lt;/STRONG&gt;&lt;/EM&gt;, would you mind (even very crudely) sketching or butchering the block diagram to show me what should go where?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Apologies again. I realise this is probably quite simple stuff, but with my inexperience any help is greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pressure Gauge Controller Photo - 2.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.ni.com/t5/image/serverpage/image-id/227864iFB978C0FE1E86D3B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pressure Gauge Controller Photo - 2.jpg" alt="Pressure Gauge Controller Photo - 2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 13:50:16 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791478#M1069593</guid>
      <dc:creator>CTumilson</dc:creator>
      <dc:date>2018-05-10T13:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791485#M1069596</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/602433"&gt;@CTumilson&lt;/a&gt;&amp;nbsp;wrote: &lt;BR /&gt;
&lt;P&gt;however that gives me an error message (Error -1073807339).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That tells me something is configured wrong and/or we are not properly understanding the instrument's protocol.&amp;nbsp; What is the instrument you are trying to communicate with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/602433"&gt;@CTumilson&lt;/a&gt;&amp;nbsp;wrote: &lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Apologies again. I realize this is probably quite simple stuff, but with my inexperience any help is greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ok, just stop what you are doing and take time to learn the basics.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/getting-started/labview-basics/" target="_blank"&gt;Learn LabVIEW Basics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/academic/students/learn/" target="_blank"&gt;Training for Students&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.learnni.com/" target="_blank"&gt;NI Learning Center&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sine.ni.com/myni/self-paced-training/app/main.xhtml" target="_blank"&gt;Online Training (SSP Required)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ni.com/training/labview/" target="_blank"&gt;Find LabVIEW Courses&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 14:02:45 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791485#M1069596</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2018-05-10T14:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791561#M1069617</link>
      <description>&lt;P&gt;Am I missing something, or has no COM port been selected?&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 16:36:07 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791561#M1069617</guid>
      <dc:creator>Mancho00</dc:creator>
      <dc:date>2018-05-10T16:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791615#M1069639</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/343472"&gt;@Mancho00&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Am I missing something, or has no COM port been selected?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The VISA Configure Serial Port has a default value of COM1.&amp;nbsp; But that could still be an issue.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 18:27:52 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791615#M1069639</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2018-05-10T18:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791775#M1069696</link>
      <description>&lt;P&gt;Hey CTumilson,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apart what the others already posted I have additional, hopefully helpful pieces of&amp;nbsp;information for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;There is an example VI shippe with LabVIEW showing&amp;nbsp;how to use VISA with instruments. Open LabVIEW, click menu "Help » Find Examples...". Then navigate to "Task » Hardware Input and Output » VISA » GPIB with VISA functions.vi".&amp;nbsp;Note that this example does not match your use case in terms of the&amp;nbsp;exact communication protocol, but it shows how to use the VISA nodes to set up communication. Put the Read/Write node(s)&amp;nbsp;into a while loop.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://zone.ni.com/reference/en-XX/help/371361P-01/glang/while_loop/" target="_self"&gt;While loop - LabVIEW 2017 Help&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;crossrulz already mentioned some resources for online training. There might be one more: &lt;A href="http://ni.com/self-paced-training" target="_self"&gt;NI's Self-Paced, Online Training Courses&lt;/A&gt;.&amp;nbsp;If he assumption is correct and you are a student / somehow&amp;nbsp;connected to a university, you might be lucky in means of your university having an Academic Site license.&amp;nbsp;This could give you free access to the Self-Paces Courses: &lt;A href="https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9aiSAC" target="_self"&gt;How Do I Access Online Training on an NI Academic Site License?&lt;/A&gt;&amp;nbsp;Give it a try, these courses are worth it!&lt;/LI&gt;
&lt;/OL&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>Fri, 11 May 2018 07:23:54 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791775#M1069696</guid>
      <dc:creator>ikaiser</dc:creator>
      <dc:date>2018-05-11T07:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Data Streams Through VISA</title>
      <link>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791800#M1069702</link>
      <description>&lt;P&gt;I've reworked the VISA as a new VI with set values for COM port, baud rate etc. It was just an tidier way to present it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And thanks for the suggested training. I'll have a look at it and hopefully I'll be able to work it out.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 09:02:47 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Simultaneous-Data-Streams-Through-VISA/m-p/3791800#M1069702</guid>
      <dc:creator>CTumilson</dc:creator>
      <dc:date>2018-05-11T09:02:47Z</dc:date>
    </item>
  </channel>
</rss>

