Pepe96 Posted March 1, 2005 Report Share Posted March 1, 2005 Hi to all, I just spent some time searching the forum, but unfortunately I did not found a satisfying result... The communication to set up should be using the RS-232 interface. I am using VISA configure serial port -> write -> read -> close (LW 7.1) I got an auto-correlator which returns me 256 equidistant ACF-values as a row of 512 Byte with the following structure: 1.byte 00(hex)...FF(hex) 2. byte 00(hex)...C0(hex) . . . 511. byte 00(hex)...FF(hex) 512. byte 00(hex)...C0(hex) For that I am using the VISA read, which gives me the correct 512 bytes after sending the "GetACF" command. By placing an indicator at the output of the VISA read and changing its properties to "hex" I see the right string. For further processing I need to convert it into numbers. Using the "Hexadecimal String to number" does not seem to work. For sure, it is my fault, but I already tried different number representations (which is the only thing to modify) Here the first 10 bytes of my signal: 04E3 04EE 04FD 04F4 04FA Using a probe data between the VISA read (read buffer out) and the Hex string to number does not indicate me the hex string, but any symbols. Could this be the problem??? Thank you in advance for any hints. Quote Link to comment
mynock Posted March 1, 2005 Report Share Posted March 1, 2005 Have already tried to solve using Type Cast? i hope it solve problem! bye! Quote Link to comment
anton.lindner Posted March 1, 2005 Report Share Posted March 1, 2005 - stupid comment; deleted - Quote Link to comment
Mark Balla Posted March 1, 2005 Report Share Posted March 1, 2005 We talked about String and hex conversion in this post it may help you to understand why the string to hex doesn't work http://forums.lavausergroup.org/index.php?...3007entry3007 Quote Link to comment
Pepe96 Posted March 1, 2005 Author Report Share Posted March 1, 2005 Hi to all, finally I am using Unflatten from String in a While Loop. It works fine, just that HEX numbers above Axxx appear negativ :-\ Also with the Type Cast, they become negative, although I am using a 16bit word as type. EDIT: ok, now it works fine. I just had to change the type to "unsigned Word" Anyway, thanks a lot for your help Quote Link to comment
Buglish Posted November 14, 2006 Report Share Posted November 14, 2006 Hi to all,I just spent some time searching the forum, but unfortunately I did not found a satisfying result... The communication to set up should be using the RS-232 interface. I am using VISA configure serial port -> write -> read -> close (LW 7.1) I got an auto-correlator which returns me 256 equidistant ACF-values as a row of 512 Byte with the following structure: 1.byte 00(hex)...FF(hex) 2. byte 00(hex)...C0(hex) . . . 511. byte 00(hex)...FF(hex) 512. byte 00(hex)...C0(hex) For that I am using the VISA read, which gives me the correct 512 bytes after sending the "GetACF" command. By placing an indicator at the output of the VISA read and changing its properties to "hex" I see the right string. For further processing I need to convert it into numbers. Using the "Hexadecimal String to number" does not seem to work. For sure, it is my fault, but I already tried different number representations (which is the only thing to modify) Here the first 10 bytes of my signal: 04E3 04EE 04FD 04F4 04FA Using a probe data between the VISA read (read buffer out) and the Hex string to number does not indicate me the hex string, but any symbols. Could this be the problem??? Thank you in advance for any hints. Hi, How would you create the string that you send using VISA that represents an integer of a number between 1 to 5. is this correct before converting to hex? I used this string before converting to hex. Is this format correct for sending a message of a integer? 0x00 0x09 1 1 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.