<?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: Convert SGL to ASCII in Instrument Control (GPIB, Serial, VISA, IVI)</title>
    <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443646#M20522</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I don't have 8.2 so I can't view the VI. Can you post an image of the diagram? Post it as a png or jpg please. &lt;/P&gt;
&lt;P&gt;And yes, the header could be a problem. If you know the length is always 2 bytes, you could simply use String Subset to get the remainder. I suggest you create a numerical indicator on the front panel to check the conversion to SgL before you save to file. It will just make it easier to debug.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2006 23:00:10 GMT</pubDate>
    <dc:creator>Dennis_Knutson</dc:creator>
    <dc:date>2006-11-20T23:00:10Z</dc:date>
    <item>
      <title>Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443521#M20512</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Hello,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I am using a VISA control to read data out of the buffer on our picoammeter through a GPIB-USB2 cable. This works very well when the data is sent from the picoammeter in ASCII characters. However, this limits the data rate, so we would like to send the data in binary to achieve faster rates.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The picoammeter can record the data in the buffer as IEEE-754 single-precision floating point binary. However, when I record the buffer string from the output of the VISA Read&amp;nbsp;VI in LabView, the data is interpreted as ASCII characters.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;From what I have read on the message boards, I could probably use the Read from SGL File VI to get at the data, but I haven't been able to find it in the version 8.2 palette or in the help.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I have tried opening the data in Excel and using the CODE command to interpret the numbers, however this does not seem to work well, perhaps because I am not parsing the data in the right way.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I have also tried writing the data to a binary file using the Write to Binary File VI and then reading it back with the Read from Binary File VI, but I have not gotten this work. I get an error message of "Error 4. LabView: End of File Reached."&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Any suggestions would be much appreciated.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;/DIV&gt;
&lt;DIV&gt;Michelle&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Nov 2006 19:23:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443521#M20512</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-20T19:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443536#M20514</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I'm not sure I understand why you want you use all of these different file i/o functions. If you just want to convert a string to SGL, then the type cast should be all that you need. Be sure to use a SGL constant datatype as the value that you wire into the type input.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/attachments/ni/140/20514/1/type%20cast.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Message Edited by Dennis Knutson on &lt;SPAN class="date_text"&gt;11-20-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:43 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 19:42:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443536#M20514</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-20T19:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443564#M20516</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi --&lt;/P&gt;
&lt;P&gt;I found the type cast function, but I still am not sure how to go about recording the SGL output in a form that I can manipulate in Excel or Origin. I'd like to save the data out as a text file or in a spreadsheet which is why I had tried various File I/O VIs.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 20:25:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443564#M20516</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-20T20:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443578#M20517</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;After doing the type cast, then convert it to a string. There is the built-in Write to Spreadsheet File that will do it for you. There are other file i/o functions such as Write to Measurement File. You could also format it yourself and just use Write File.</description>
      <pubDate>Mon, 20 Nov 2006 20:45:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443578#M20517</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-20T20:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443595#M20518</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thanks for your patience. I think I am very close to getting this to work, but now it is only recording the first data point. I wired the output of the type cast VI to the Write to Spreadsheet VI through the Build Array VI. It records the output to the specified file, but only the very first value.&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 21:07:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443595#M20518</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-20T21:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443608#M20520</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Well, you are wiring only a single value into the build array function. In order to write more than one value, you will have to acquire more than one before you write it. Or, everytime you run your VI, you append new data to the existing file. If you have your instrument i/o inside of a while loop, you can wire the SGL to the edge of the loop, right click on the exit tunnel and select Enable Indexing. then your Write to Spreadsheet would be outside the loop and you would do a single save. &lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 21:35:19 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443608#M20520</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-20T21:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443642#M20521</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Thank you for that suggestion, it worked very well. However, for some reason, the VI is now recording the number zero over and over, instead of the data. Recording the data in ASCII format (example attached) still works, so I think things are ok on the picoammeter side.&lt;/P&gt;
&lt;P&gt;There is a 2 byte header (#0) in front of each reading, perhaps this is causing problems with the conversion to SGL?&lt;/P&gt;
&lt;P&gt;I've attached a copy of the current version of the VI, in case that might shed light on things.&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 22:50:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443642#M20521</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-20T22:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443646#M20522</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I don't have 8.2 so I can't view the VI. Can you post an image of the diagram? Post it as a png or jpg please. &lt;/P&gt;
&lt;P&gt;And yes, the header could be a problem. If you know the length is always 2 bytes, you could simply use String Subset to get the remainder. I suggest you create a numerical indicator on the front panel to check the conversion to SgL before you save to file. It will just make it easier to debug.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2006 23:00:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/443646#M20522</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-20T23:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444007#M20527</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Attached is a PNG image of the block diagram so far. I've added an indicator to the front panel so that I can see the SGL conversion as it is done. I've also tried to cut out the two byte header before each data value using the String Subset function, but I am still not getting reasonable data. It reads out about 9x10^-10 A for the data when the picoammeter is reading 5 microA. Am I wrong in thinking that setting the offset to 2 should remove the first two characters? (The header is #0 in ASCII characters).&lt;/P&gt;
&lt;P&gt;Currently the program is set to read out the current value and the timestamp from the picoammeter. I thought that might be a problem, so I tried just retrieving the current value, but I got the same incorrect data values after the SGL conversion.&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2006 14:38:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444007#M20527</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-21T14:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444015#M20528</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;Can you post an example with the raw string from the Visa read, and what the value is supposed to be?&amp;nbsp; I think that the type cast is causing your problems.&amp;nbsp; It can be a dangerous thing to use when looking at numbers.</description>
      <pubDate>Tue, 21 Nov 2006 14:54:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444015#M20528</guid>
      <dc:creator>Brian_Beal</dc:creator>
      <dc:date>2006-11-21T14:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444018#M20529</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;I think it would also be helpful to see exactly what the manual has to say about the binary transfer. I agree with Brian that the type cast is causing the problem and seeing the raw data would help enormously.</description>
      <pubDate>Tue, 21 Nov 2006 14:58:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444018#M20529</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-21T14:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444028#M20530</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Here is an example of the raw data from the read buffer string. I've saved it to a text file, so it opens up as ASCII characters. It should be reading about 5E-6 in the left column (5 uA) and a timestamp in the right column.&lt;BR /&gt;&lt;BR /&gt;Let me know if there is a better way to save out this data for you to look at (other than a text file).&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2006 15:04:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444028#M20530</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-21T15:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444099#M20535</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;That doesn't look right. If the #0 is a header, then there should be 4 characters after that for a 32 bit SGL representation. The idea of creating a string indicator on the front and saving a reading with a default value will work but I can't view an 8.2 file. Could you do something like the attached? The icons for 8.2 are different. It's a Open/Create/Replace File, a File Write, and File Close. If you could run this just once, I'd like to see how the data is stored.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://forums.ni.com/attachments/ni/140/20535/1/Write%20Once.PNG" /&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Dennis Knutson on &lt;SPAN class="date_text"&gt;11-21-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:12 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2006 16:12:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444099#M20535</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-21T16:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444185#M20537</link>
      <description>I guess that the speed you think to gain by binary transfers is much less than the conversion speed of the instrument.&lt;BR /&gt;I think you are right in that binary is faster, but the difference is very small.&lt;BR /&gt;&lt;BR /&gt;I support the question for a raw dump.&lt;BR /&gt;to get this create an indicator at the output of the visa read. &lt;BR /&gt;after running, make all values default, and save the vi.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Nov 2006 18:05:49 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444185#M20537</guid>
      <dc:creator>Albert.Geven</dc:creator>
      <dc:date>2006-11-21T18:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444320#M20549</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I think there are a couple of reasons why the ASCII interpretation of the SGL signal may not look right. When the data is transmitted from the picoammeter in ASCII, there is a comma between the current value and the time stamp (attachment to Reply 7). I'm not sure how or if this is sent in binary. Also, the picoammeter manual mentions that there is also a terminator after each value sent as SGL, but it doesn't say what this terminator is or how long it is. Perhaps this is interfering with the conversion. I've attached a PNG image of the relevant page from the manual.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I tried wiring the suggested functions to save a reading from the buffer read string. I couldn't find a VI for "File Write" in version 8.2 of LabView. I used "Format to File," which was as close as I could find. The resulting file with a single reading is attached --although I don't know how to open the file except in Notepad, which interprets it as the same ASCII characters as the last VI (Reply 9). I've added TXT as the file extension so that I could post it. I've also included a PNG image of the block diagram showing how I wired the VI to create this file. I may not have done it as you had intended.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;In the VI I also added a string indicator on the front panel. I don't mind using this indicator to capture the data and then saving it out after the experiment is complete; however, I am still faced with the challenge of converting the indicator readout (which is in ASCII) into a comprehensible number. Suggestions?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm hoping/expecting to gain a lot in speed by transmitting the data in binary. The instrument specs say that with the settings I'm using and binary transmission, we should get 900 readings/s over the GPIB bus. When we use these same settings with ASCII transmission, we've only gotten up to 75 Hz, which is insufficient for our application.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks,&lt;BR /&gt;Michelle&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Nov 2006 22:27:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444320#M20549</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-21T22:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444524#M20552</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;The format looks just like a LabVIEW SGL.&lt;BR /&gt;But your file is 10 bytes size and has the following content(hex):&lt;BR /&gt;23 30 B0 84 00 00 46 B4 4C A8 0D 0A&lt;BR /&gt;header #0 (23 30)&lt;BR /&gt;numbers (sgl) B0 84 00 00&lt;BR /&gt;number 2 46&amp;nbsp; B4 4C A8&lt;BR /&gt;termination 0D 0A&lt;BR /&gt;With the following code&lt;BR /&gt;&lt;IMG src="http://forums.ni.com/attachments/ni/140/20552/1/Example_BD.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;The numbers are converted into:&lt;BR /&gt;-9.60426e-10&lt;BR /&gt;23078.3&lt;BR /&gt;Hope this give you some clues.&lt;BR /&gt;&lt;BR /&gt;Ton&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by TonP on &lt;SPAN class="date_text"&gt;11-22-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:41 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2006 09:37:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444524#M20552</guid>
      <dc:creator>TCPlomp</dc:creator>
      <dc:date>2006-11-22T09:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444724#M20564</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;Those are the numbers I'm coming up with too and they're not matching the 5e-6 and 2e2 ranges that the ASCII setup is retruning. I've tried manipulating the string and the result bits in numerous ways but no luck yet.</description>
      <pubDate>Wed, 22 Nov 2006 16:57:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/444724#M20564</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2006-11-22T16:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/446552#M20629</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I'd like to try some conversions, but I'm not clear on how you are getting from ASCII to SGL. I don't seem to get the same numbers. Should I try going to hex in between? If so, how can I do that?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:41:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/446552#M20629</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-11-28T14:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/447012#M20664</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;Hi Michelle,&lt;BR /&gt;&lt;BR /&gt;what kind of code are you using?&lt;BR /&gt;I didn't do any conversion, I only told LabVIEW to view (a part) of the string as a SGL. It is only memory mapping. &lt;BR /&gt;Have you tried rebuilding my code?&lt;BR /&gt;You could also try this on your code:&lt;BR /&gt;&lt;IMG src="http://forums.ni.com/attachments/ni/140/20664/1/Example_BD.png" /&gt;&lt;BR /&gt;Ton&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by TonP on &lt;SPAN class="date_text"&gt;11-29-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;07:31 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2006 06:30:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/447012#M20664</guid>
      <dc:creator>TCPlomp</dc:creator>
      <dc:date>2006-11-29T06:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SGL to ASCII</title>
      <link>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/448702#M20774</link>
      <description>&lt;DIV&gt;Hello,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I didn't try to rebuild the first code you posted. I'm not clear on where the input is for the data file/values on that one?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I did try building the last code you posted, but I'm still not getting the correct values out for the SGL numbers. (They should still be 5 uA and the time value, starting at zero. The current value is definitely wrong, but the time value does start at zero and go up from there.) I wasn't clear on what representation you used for the header. Your label says I16, but the unbundle says I32. I tried both with similar results. I also tried using two separate bytes for the header or using two separate bytes for the header and two for the terminator. I was very surprised when this didn't work. I set it up to record all the unbundled values (not just the SGL values) and found that it is reading out 35 48 for the header and 10 0 for the terminator. This was surprising to me, since these values don't reflect the ASCII (#0), binary, or hex (23 30) values for the header.... Any idea what's up?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I've attached an image of my last iteration with this code, so you can see how I've wired it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks for your help,&lt;/DIV&gt;
&lt;DIV&gt;Michelle&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Dec 2006 17:02:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Instrument-Control-GPIB-Serial/Convert-SGL-to-ASCII/m-p/448702#M20774</guid>
      <dc:creator>Mkova00</dc:creator>
      <dc:date>2006-12-01T17:02:48Z</dc:date>
    </item>
  </channel>
</rss>

