10-31-2005 09:06 PM
11-01-2005 06:08 AM
11-02-2005 09:26 AM
11-07-2005 06:02 PM
11-09-2005 07:15 AM
Sorry for the delay, I was on vacation yesterday. See what this link gets you. Search hex to ascii in the discussion forums.
http://digital.ni.com/public.nsf/websearch/77c8f61d36f5a23086256634005acb38
11-10-2005 05:09 AM
11-18-2005 03:15 PM
11-22-2005 05:18 PM - edited 11-22-2005 05:18 PM
PGH,
To convert your data from a string back to a number, simply use the reverse of the same conversion method you used before (String to Byte Array.vi). Since your data is in an array of strings, you will need to use a for loop to index the array and convert each character one-by-one. Since the String to Byte Array.vi returns a number that is already within an array, you will need to insert it into a pre-existing array rather than index into an array (which would create a 2D array). I've posted a picture below about this concept.
Once you have an array of numeric data, you can simply connect it to the Write to Spreadsheet File.vi.
Kind Regards,
Message Edited by AESulzer on 11-22-2005 05:19 PM
11-23-2005 05:07 AM
11-28-2005 06:35 PM
PGH,
I can not execute your code to see the behavior because I do not have the same hardware setup that you have, but I would recommend simply debugging your code. For instance, have you looked at what string is actually being returned by the VISA Read (either by attaching an indicator to the output or by using probes)? Perhaps the data you are receiving is actually a real string and not hex data afterall, or perhaps the wrong command to get the data is being written and no data is being returned. I would definitely check that VISA Read output -- it will tell you a lot.
Kind Regards,