<?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: GPIB Problems with Extra Characters in Instrument Control (GPIB, Serial, VISA, IVI)</title>
    <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403192#M18656</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;I wouldn't say that CR/LF is common. Prior to 488.2, some GPIB instruments did require a CR/LF along with EOI or instead of EOI. This is probably a legacy of serial instruments being converted to GPIB. Often, the GPIB controller itself was configured to send it. Some drivers are written to always append a CR/LF to be compatible with&amp;nbsp;both a serial and GPIB version and knowing that the GPIB instrument will ignore it. The preferred method when writing a driver today is to first check the type of VISA session and only if it's serial, configure VISA for a termination character. There's no real reason to append anything additional in your messages but your instrument should be set to parse it out and ignore it.</description>
    <pubDate>Fri, 11 Aug 2006 16:46:54 GMT</pubDate>
    <dc:creator>Dennis_Knutson</dc:creator>
    <dc:date>2006-08-11T16:46:54Z</dc:date>
    <item>
      <title>GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/402896#M18640</link>
      <description>&lt;DIV&gt;I designed an instrument controller for RF amplifiers using a TNT4882 chip. All is well when communicating&amp;nbsp;with it via MAX, LabWindows&amp;nbsp;or LabView, but I have a user that can't talk to it using his PyVisa code. He is able to talk with other, standard instruments. We used NI Spy with both MAX and his software and made an interesting observation. For example if *IDN? is sent via MAX, NI Spy shows&amp;nbsp; ibwrt(UD0, "*IDN?", 5 (0x5)), as expected. However, using the PyVisa code we get&amp;nbsp;viWrite (0x0130B2C0, "*IDN?..", 7, 7). It appears that my code does not like the "..", which I believe signifies non-printable characters. The other instruments (e.g., Agilent) don't seem to mind the "..". Is there some sort of standard convention that I am missing?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Steve&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Aug 2006 23:52:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/402896#M18640</guid>
      <dc:creator>SteveW</dc:creator>
      <dc:date>2006-08-10T23:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403055#M18647</link>
      <description>You can double-click on the particular line in NI Spy with the extra characters. This will bring up another dialog window. From there you can click on the buffer tab and see the hex ASCII codes for the last two characters. As you stated, periods are usually non-printable characters.&lt;BR /&gt;&lt;BR /&gt;Is it possible that the last two characters are for termination? If so I imagine there is a setting in &lt;SPAN class="noindex"&gt;PyVisa to turn this off.&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Aug 2006 13:01:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403055#M18647</guid>
      <dc:creator>Collin M</dc:creator>
      <dc:date>2006-08-11T13:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403094#M18650</link>
      <description>It is very likely that the characters are Carriage Return (0x0D) and Linefeed (0x0A).&amp;nbsp; It is pretty common for users to add these characters, as old instruments often needed these characters for termination.&amp;nbsp; As time has progressed, more instrument correctly respond to the EOI line asserting as the termination for a GPIB write.&amp;nbsp; However, many instruments still maintain some compatibility for CR &amp;amp; LF.&lt;BR /&gt;&lt;BR /&gt;Craig A&lt;BR /&gt;National Instruments Engineer&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Aug 2006 14:18:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403094#M18650</guid>
      <dc:creator>NI-488.2 master</dc:creator>
      <dc:date>2006-08-11T14:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403142#M18652</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;Most likely the "standard" instruments which you say work fine with the extra characters strip any trailing carriage returns and linefeeds from the command before processing it.&amp;nbsp; To make your device compatible, you would need to do the same in your device application, so that the \r\n which is likely at the end of this string is ignored.&lt;BR /&gt;&lt;BR /&gt;Jason S.&lt;BR /&gt;National Instruments&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Aug 2006 15:17:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403142#M18652</guid>
      <dc:creator>JasonSmith</dc:creator>
      <dc:date>2006-08-11T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403144#M18653</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Now that I know how to better use NI Spy, I see that the added characters are indeed CR/LF. I did not realize that these characters would be common with GPIB communications. I will strip-off these characters in my code. Should I append messages with CR/LF for compatibility? Is there a down side in doing this?&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2006 15:19:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403144#M18653</guid>
      <dc:creator>SteveW</dc:creator>
      <dc:date>2006-08-11T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403192#M18656</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;I wouldn't say that CR/LF is common. Prior to 488.2, some GPIB instruments did require a CR/LF along with EOI or instead of EOI. This is probably a legacy of serial instruments being converted to GPIB. Often, the GPIB controller itself was configured to send it. Some drivers are written to always append a CR/LF to be compatible with&amp;nbsp;both a serial and GPIB version and knowing that the GPIB instrument will ignore it. The preferred method when writing a driver today is to first check the type of VISA session and only if it's serial, configure VISA for a termination character. There's no real reason to append anything additional in your messages but your instrument should be set to parse it out and ignore it.</description>
      <pubDate>Fri, 11 Aug 2006 16:46:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403192#M18656</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-08-11T16:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403201#M18657</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Many thanks to everyone. Your responses were a big help.&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2006 17:01:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/403201#M18657</guid>
      <dc:creator>SteveW</dc:creator>
      <dc:date>2006-08-11T17:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404008#M18708</link>
      <description>My problem is I need to add the LF/CR to the box used for text entry.&amp;nbsp; Thanks Jerry &lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Aug 2006 00:23:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404008#M18708</guid>
      <dc:creator>Jeromelee</dc:creator>
      <dc:date>2006-08-15T00:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404053#M18711</link>
      <description>What box are you talking about? Is this question of yours related to this thread which has to do with designing a GPIB interface for an instrument? If not, you should post your question in a brand new thread. Either case, you need to provide a few more details.</description>
      <pubDate>Tue, 15 Aug 2006 03:16:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404053#M18711</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-08-15T03:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404368#M18730</link>
      <description>It seems I did leave a lot out.&amp;nbsp; I am working with NI 488.2 to
communicate with an older instrument that requires the line feed and
carriage return &lt;BR /&gt;
symbols at the end of all instructions. I am using Measurement and
Automation Explorer version 2.2.0.3010&amp;nbsp; on a Windows 98 SE
system.&amp;nbsp; Under device it shows GPIB (PCI-GPIB)&amp;nbsp; and under
that it shows Instrument. I click on communicate with instrument and
the box that says Send String comes up. This is where I need to enter
those symbols.&amp;nbsp; Hope that makes things a bit easier.&amp;nbsp; Thanks
Jerry&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Aug 2006 16:58:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404368#M18730</guid>
      <dc:creator>Jeromelee</dc:creator>
      <dc:date>2006-08-15T16:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404382#M18731</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;With the newer versions of MAX you can send CR and LF by typing \r and \n. I don't know if this will work with your older version, but it is worth a try.</description>
      <pubDate>Tue, 15 Aug 2006 17:32:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/404382#M18731</guid>
      <dc:creator>SteveW</dc:creator>
      <dc:date>2006-08-15T17:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: GPIB Problems with Extra Characters</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/405076#M18775</link>
      <description>Thanks, the \r and \n worked perfect.&amp;nbsp; Live and learn.&amp;nbsp; Also helps to have an expert to ask.&amp;nbsp;&amp;nbsp; Later Jerry&lt;BR /&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Aug 2006 02:10:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/GPIB-Problems-with-Extra-Characters/m-p/405076#M18775</guid>
      <dc:creator>Jeromelee</dc:creator>
      <dc:date>2006-08-17T02:10:21Z</dc:date>
    </item>
  </channel>
</rss>

